Last change
on this file since 1441 was
1342,
checked in by MatthewWhiting, 10 years ago
|
Initial commit of the code for #204. Porting the OptimisedGrower? from the ASKAP/Selavy code, getting it to build, and implementing as a separate growing step in Merger.cc. Still to test.
|
File size:
1014 bytes
|
Rev | Line | |
---|
[1342] | 1 | #ifndef DUCHAMP_OPTIMISED_GROWER_H_ |
---|
| 2 | #define DUCHAMP_OPTIMISED_GROWER_H_ |
---|
| 3 | |
---|
| 4 | #include <duchamp/param.hh> |
---|
| 5 | #include <duchamp/Detection/ObjectGrower.hh> |
---|
| 6 | #include <duchamp/Detection/detection.hh> |
---|
| 7 | |
---|
| 8 | namespace duchamp{ |
---|
| 9 | |
---|
| 10 | class OptimisedGrower : public ObjectGrower |
---|
| 11 | { |
---|
| 12 | public: |
---|
| 13 | OptimisedGrower(); |
---|
| 14 | OptimisedGrower(Param &par); |
---|
| 15 | virtual ~OptimisedGrower(){}; |
---|
| 16 | |
---|
| 17 | void grow(Detection *object); |
---|
| 18 | |
---|
| 19 | void setFlag(int x, int y, int z, STATE newstate); |
---|
| 20 | void setFlag(size_t pos, STATE newstate){itsFlagArray[pos] = newstate;}; |
---|
| 21 | void setFlag(Voxel vox, STATE newstate){setFlag(vox.getX(),vox.getY(),vox.getZ(),newstate);}; |
---|
| 22 | void setMaxIter(int i){maxIterations=i;}; |
---|
| 23 | void setMaxMinZ(int max, int min){zmin=std::min(min,max);zmax=std::max(min,max);}; |
---|
| 24 | void setClobber(bool b){clobberPrevious=b;}; |
---|
| 25 | void findEllipse(); |
---|
| 26 | Detection growMask(); |
---|
| 27 | |
---|
| 28 | protected: |
---|
| 29 | double ell_a,ell_b,ell_theta; |
---|
| 30 | int maxIterations; |
---|
| 31 | float totalFlux, maxFlux; |
---|
| 32 | Detection *itsObj; |
---|
| 33 | int xObj, yObj, zmin, zmax; |
---|
| 34 | bool clobberPrevious; |
---|
| 35 | }; |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.