00001 #ifndef IMAGEANALYSIS_IMAGEDECOMPOSERTASK_H 00002 #define IMAGEANALYSIS_IMAGEDECOMPOSERTASK_H 00003 00004 #include <imageanalysis/ImageAnalysis/ImageTask.h> 00005 00006 #include <casa/namespace.h> 00007 00008 namespace casa { 00009 00010 template <class T> class ImageDecomposerTask : public ImageTask<T> { 00011 // <summary> 00012 // Top level interface for decomposing of images. 00013 // </summary> 00014 00015 // <reviewed reviewer="" date="" tests="" demos=""> 00016 // </reviewed> 00017 00018 // <prerequisite> 00019 // </prerequisite> 00020 00021 // <etymology> 00022 // </etymology> 00023 00024 // <synopsis> 00025 // </synopsis> 00026 00027 public: 00028 00029 ImageDecomposerTask() = delete; 00030 00031 ImageDecomposerTask( 00032 SPCIIT image, const Record *const region, const String& mask 00033 ); 00034 00035 // destructor 00036 ~ImageDecomposerTask() {} 00037 00038 Matrix<T> decompose(Matrix<Int>& blcs, Matrix<Int>& trcs); 00039 00040 String getClass() const { const static String s = "ImageDecomposerTask"; return s; } 00041 00042 void setSimple(Bool b) { _simple = b; } 00043 00044 void setDeblendOptions(Double threshold, Int nContour, Int minRange, Int nAxis); 00045 00046 void setFit(Bool b) { _fit = b; } 00047 00048 void setFitOptions(Double maxrms, Int maxRetry, Int maxIter, Double convCriteria); 00049 00050 protected: 00051 00052 inline CasacRegionManager::StokesControl _getStokesControl() const { 00053 return CasacRegionManager::USE_ALL_STOKES; 00054 } 00055 00056 inline std::vector<Coordinate::Type> _getNecessaryCoordinates() const { 00057 return std::vector<Coordinate::Type>(); 00058 } 00059 00060 inline Bool _supportsMultipleBeams() const {return True;} 00061 00062 private: 00063 Bool _simple = False; 00064 Double _threshold = -1; 00065 Int _ncontour = 11; 00066 Int _minrange = 1; 00067 Int _naxis = 2; 00068 Bool _fit = True; 00069 Double _maxrms = -1; 00070 Int _maxretry = -1; 00071 Int _maxiter = 256; 00072 Double _convcriteria = 0.0001; 00073 }; 00074 } 00075 00076 #ifndef AIPS_NO_TEMPLATE_SRC 00077 #include <imageanalysis/ImageAnalysis/ImageDecomposerTask.tcc> 00078 #endif 00079 00080 #endif