00001 #ifndef IMAGES_IMAGEEDECIMATOR_H 00002 #define IMAGES_IMAGEEDECIMATOR_H 00003 00004 #include <imageanalysis/ImageAnalysis/ImageTask.h> 00005 00006 #include <imageanalysis/ImageAnalysis/ImageDecimatorData.h> 00007 00008 #include <casa/namespace.h> 00009 00010 namespace casa { 00011 00012 template <class T> class ImageDecimator : public ImageTask<T> { 00013 // <summary> 00014 // Top level interface for removing image planes. 00015 // </summary> 00016 00017 // <reviewed reviewer="" date="" tests="" demos=""> 00018 // </reviewed> 00019 00020 // <prerequisite> 00021 // </prerequisite> 00022 00023 // <etymology> 00024 // Decimates planes of image 00025 // </etymology> 00026 00027 // <synopsis> 00028 // Top level interface for removing image planes. 00029 // </synopsis> 00030 00031 public: 00032 00033 ImageDecimator( 00034 const SPCIIT image, 00035 const Record *const region, 00036 const String& maskInp, 00037 const String& outname, Bool overwrite 00038 ); 00039 00040 // destructor 00041 ~ImageDecimator() {} 00042 00043 SPIIT decimate() const; 00044 00045 String getClass() const { const static String s = "ImageDecimator"; return s; } 00046 00047 // every nth plane will be kept 00048 void setFactor(uInt n); 00049 00050 // Set the pixel axis number along which the decimation will occur 00051 void setAxis(uInt n); 00052 00053 // set the decimation function 00054 void setFunction(ImageDecimatorData::Function f); 00055 00056 protected: 00057 inline CasacRegionManager::StokesControl _getStokesControl() const { 00058 return CasacRegionManager::USE_ALL_STOKES; 00059 } 00060 00061 inline std::vector<Coordinate::Type> _getNecessaryCoordinates() const { 00062 return std::vector<Coordinate::Type>(); 00063 } 00064 00065 inline Bool _supportsMultipleBeams() const {return False;} 00066 00067 inline Bool _supportsMultipleRegions() const {return True;} 00068 00069 private: 00070 uInt _axis, _factor; 00071 ImageDecimatorData::Function _function; 00072 00073 // disallow default constructor 00074 ImageDecimator(); 00075 }; 00076 } 00077 00078 #ifndef AIPS_NO_TEMPLATE_SRC 00079 #include <imageanalysis/ImageAnalysis/ImageDecimator.tcc> 00080 #endif 00081 00082 #endif