Last change
on this file since 3112 was 3106, checked in by Takeshi Nakazato, 8 years ago |
New Development: No
JIRA Issue: No
Ready for Test: Yes/No
Interface Changes: Yes/No
What Interface Changed: Please list interface changes
Test Programs: List test programs
Put in Release Notes: Yes/No
Module(s): Module Names change impacts.
Description: Describe your changes here...
Check-in asap modifications from Jim regarding casacore namespace conversion.
|
File size:
1.2 KB
|
Line | |
---|
1 | //
|
---|
2 | // C++ Implimentation: EdgeDetector
|
---|
3 | //
|
---|
4 | // Description:
|
---|
5 | //
|
---|
6 | //
|
---|
7 | // Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp>, (C) 2012
|
---|
8 | //
|
---|
9 | // Copyright: See COPYING file that comes with this distribution
|
---|
10 | //
|
---|
11 | //
|
---|
12 |
|
---|
13 | #include "EdgeDetector.h"
|
---|
14 | #include "MathUtils.h"
|
---|
15 |
|
---|
16 | using namespace std ;
|
---|
17 | using namespace casacore ;
|
---|
18 |
|
---|
19 | namespace asap {
|
---|
20 |
|
---|
21 | EdgeDetector::EdgeDetector()
|
---|
22 | : off_(),
|
---|
23 | tempIP_( 1, 1 )
|
---|
24 | {}
|
---|
25 |
|
---|
26 | EdgeDetector::~EdgeDetector()
|
---|
27 | {}
|
---|
28 |
|
---|
29 | void EdgeDetector::setDirection( const Matrix<Double> &dir )
|
---|
30 | {
|
---|
31 | //dir_.reference( dir ) ;
|
---|
32 | //dir_ = dir.copy() ;
|
---|
33 | dir_.reference(dir.copy());
|
---|
34 | Vector<Double> ra( dir_.row(0) ) ;
|
---|
35 | mathutil::rotateRA( ra ) ;
|
---|
36 | resizeTempArea( dir.nrow() ) ;
|
---|
37 | }
|
---|
38 |
|
---|
39 | void EdgeDetector::setTime( const Vector<Double> &t )
|
---|
40 | {
|
---|
41 | time_.reference( t ) ;
|
---|
42 | resizeTempArea( t.nelements() ) ;
|
---|
43 | }
|
---|
44 |
|
---|
45 | void EdgeDetector::resizeTempArea( const uInt &n )
|
---|
46 | {
|
---|
47 | if ( tempuInt_.nelements() < n ) {
|
---|
48 | tempuInt_.resize( n, False, False ) ;
|
---|
49 | }
|
---|
50 | }
|
---|
51 |
|
---|
52 | Vector<uInt> EdgeDetector::vectorFromTempStorage( const uInt &n )
|
---|
53 | {
|
---|
54 | tempIP_[0] = n ;
|
---|
55 | return Vector<uInt>( tempIP_, tempuInt_.storage(), COPY ) ;
|
---|
56 | }
|
---|
57 |
|
---|
58 | void EdgeDetector::initDetect()
|
---|
59 | {
|
---|
60 | off_.resize() ;
|
---|
61 | }
|
---|
62 |
|
---|
63 | void EdgeDetector::setOption( const Record &option )
|
---|
64 | {
|
---|
65 | this->parseOption( option ) ;
|
---|
66 | }
|
---|
67 |
|
---|
68 | } // namespace asap
|
---|
Note:
See
TracBrowser
for help on using the repository browser.