Last change
on this file since 2808 was 2619, checked in by Takeshi Nakazato, 12 years ago |
New Development: No
JIRA Issue: Yes CAS-2825
Ready for Test: Yes
Interface Changes: No
What Interface Changed: Please list interface changes
Test Programs: not available
Put in Release Notes: No
Module(s): Module Names change impacts.
Description: Describe your changes here...
Take care of 2pi rotation on RA axis.
|
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 casa ;
|
---|
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 | Vector<Double> ra( dir_.row(0) ) ;
|
---|
34 | mathutil::rotateRA( ra ) ;
|
---|
35 | resizeTempArea( dir.nrow() ) ;
|
---|
36 | }
|
---|
37 |
|
---|
38 | void EdgeDetector::setTime( const Vector<Double> &t )
|
---|
39 | {
|
---|
40 | time_.reference( t ) ;
|
---|
41 | resizeTempArea( t.nelements() ) ;
|
---|
42 | }
|
---|
43 |
|
---|
44 | void EdgeDetector::resizeTempArea( const uInt &n )
|
---|
45 | {
|
---|
46 | if ( tempuInt_.nelements() < n ) {
|
---|
47 | tempuInt_.resize( n, False, False ) ;
|
---|
48 | }
|
---|
49 | }
|
---|
50 |
|
---|
51 | Vector<uInt> EdgeDetector::vectorFromTempStorage( const uInt &n )
|
---|
52 | {
|
---|
53 | tempIP_[0] = n ;
|
---|
54 | return Vector<uInt>( tempIP_, tempuInt_.storage(), COPY ) ;
|
---|
55 | }
|
---|
56 |
|
---|
57 | void EdgeDetector::initDetect()
|
---|
58 | {
|
---|
59 | off_.resize() ;
|
---|
60 | }
|
---|
61 |
|
---|
62 | void EdgeDetector::setOption( const Record &option )
|
---|
63 | {
|
---|
64 | this->parseOption( option ) ;
|
---|
65 | }
|
---|
66 |
|
---|
67 | } // namespace asap
|
---|
Note:
See
TracBrowser
for help on using the repository browser.