source: trunk/src/GenericEdgeDetector.h@ 3123

Last change on this file since 3123 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.7 KB
Line 
1//
2// C++ Interface: GenericEdgeDetector
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#ifndef _GENERIC_EDGE_DETECTOR_H_
13#define _GENERIC_EDGE_DETECTOR_H_
14
15#include <casa/Arrays/Vector.h>
16#include <casa/Containers/Record.h>
17
18#include "EdgeDetector.h"
19
20namespace asap {
21
22class GenericEdgeDetector : public EdgeDetector
23{
24public:
25 GenericEdgeDetector() ;
26 virtual ~GenericEdgeDetector() ;
27
28 casacore::Vector<casacore::uInt> detect() ;
29
30private:
31 // parse options
32 void parseOption( const casacore::Record &option ) ;
33
34 // steps for edge detection algorithm
35 void topixel() ;
36 void countup() ;
37 void thresholding() ;
38 void labeling() ;
39 void trimming() ;
40 void selection() ;
41 void tuning() ;
42
43 // internal methods
44 void setup() ;
45 casacore::uInt _labeling() ;
46 casacore::uInt __labeling( casacore::Vector<casacore::uInt> &a ) ;
47 casacore::uInt _trimming() ;
48 casacore::uInt _trimming1DX() ;
49 casacore::uInt _trimming1DY() ;
50 casacore::uInt _trimming1D( casacore::Vector<casacore::uInt> &a ) ;
51 void _search( casacore::uInt &start,
52 casacore::uInt &end,
53 const casacore::Vector<casacore::uInt> &a ) ;
54
55 // pixel info
56 casacore::Double cenx_ ;
57 casacore::Double ceny_ ;
58 casacore::Double pcenx_ ;
59 casacore::Double pceny_ ;
60 casacore::uInt nx_ ;
61 casacore::uInt ny_ ;
62 casacore::Double dx_ ;
63 casacore::Double dy_ ;
64
65 // storage for detection
66 casacore::Matrix<casacore::Double> pdir_ ;
67 casacore::Matrix<casacore::uInt> apix_ ;
68
69 // options
70 casacore::Float width_ ;
71 casacore::Float fraction_ ;
72 casacore::Bool elongated_ ;
73} ;
74
75}
76#endif /* _GENERIC_EDGE_DETECTOR_H_ */
Note: See TracBrowser for help on using the repository browser.