00001 #ifndef IMAGEANALYSIS_IMAGEREBINNER_H 00002 #define IMAGEANALYSIS_IMAGEREBINNER_H 00003 00004 #include <imageanalysis/ImageAnalysis/ImageTask.h> 00005 00006 #include <casa/namespace.h> 00007 00008 namespace casa { 00009 00010 template <class T> class ImageRebinner : public ImageTask<T> { 00011 // <summary> 00012 // Top level interface for image rebinning 00013 // </summary> 00014 00015 // <reviewed reviewer="" date="" tests="" demos=""> 00016 // </reviewed> 00017 00018 // <prerequisite> 00019 // </prerequisite> 00020 00021 // <etymology> 00022 // Rebins an image to larger pixels. 00023 // </etymology> 00024 00025 // <synopsis> 00026 // Top level interface for rebinning images. 00027 // </synopsis> 00028 00029 public: 00030 00031 00032 ImageRebinner( 00033 const SPCIIT image, const Record *const region, 00034 const String& maskInp, 00035 const String& outname, Bool overwrite 00036 ); 00037 00038 // destructor 00039 virtual ~ImageRebinner() {} 00040 00041 SPIIT rebin() const; 00042 00043 virtual String getClass() const { const static String s = "ImageRebinner"; return s; } 00044 00045 // Set the factors (1 for each axis) to rebin by. 00046 void setFactors(const Vector<Int>& f); 00047 00048 void setCrop(Bool c) { _crop = c; } 00049 00050 protected: 00051 00052 CasacRegionManager::StokesControl _getStokesControl() const { 00053 return CasacRegionManager::USE_ALL_STOKES; 00054 } 00055 00056 std::vector<Coordinate::Type> _getNecessaryCoordinates() const { 00057 return std::vector<Coordinate::Type>(); 00058 } 00059 00060 private: 00061 IPosition _factors; 00062 Bool _crop; 00063 00064 // disallow default constructor 00065 ImageRebinner(); 00066 }; 00067 } 00068 00069 #ifndef AIPS_NO_TEMPLATE_SRC 00070 #include <imageanalysis/ImageAnalysis/ImageRebinner.tcc> 00071 #endif 00072 00073 #endif