Image1DSmoother.h

Go to the documentation of this file.
00001 #ifndef IMAGEANALYSIS_IMAGE1DSMOOTHER_H
00002 #define IMAGEANALYSIS_IMAGE1DSMOOTHER_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 Image1DSmoother : public ImageTask<T> {
00013         // <summary>
00014         // Top level interface for 1-D smoothing of images.
00015         // </summary>
00016 
00017         // <reviewed reviewer="" date="" tests="" demos="">
00018         // </reviewed>
00019 
00020         // <prerequisite>
00021         // </prerequisite>
00022 
00023         // <etymology>
00024         // Smooths an image in one dimension.
00025         // </etymology>
00026 
00027         // <synopsis>
00028         // Top level interface for removing image planes.
00029         // </synopsis>
00030 
00031 public:
00032 
00033         // destructor
00034         virtual ~Image1DSmoother() {}
00035 
00036         SPIIT smooth() const;
00037 
00038         virtual String getClass() const { const static String s = "Image1DSmoother"; return s; }
00039 
00040         // Keep only every nth plane
00041         void setDecimate(Bool b) {_decimate = b; }
00042 
00043         // Set the pixel axis number along which the smoothing will occur
00044         void setAxis(uInt n);
00045 
00046         // Set the decimation function.
00047         inline void setDecimationFunction(ImageDecimatorData::Function f) {
00048                 _decimationFunction = f;
00049         }
00050 
00051 protected:
00052 
00053         Image1DSmoother(
00054                 const SPCIIT image,
00055                 const Record *const region,
00056                 const String& maskInp,
00057                 const String& outname, Bool overwrite
00058         );
00059 
00060         virtual SPIIT _smooth(const ImageInterface<T>& image) const = 0;
00061 
00062         inline  CasacRegionManager::StokesControl _getStokesControl() const {
00063                 return CasacRegionManager::USE_ALL_STOKES;
00064         }
00065 
00066         inline std::vector<Coordinate::Type> _getNecessaryCoordinates() const {
00067                 return std::vector<Coordinate::Type>();
00068         }
00069 
00070     inline Bool _supportsMultipleBeams() const {return False;}
00071 
00072     inline Bool _getDecimate() const { return _decimate; }
00073 
00074     inline ImageDecimatorData::Function _getDecimationFunction() const {
00075         return _decimationFunction;
00076     }
00077 
00078     inline uInt _getAxis() const { return _axis; }
00079 
00080     inline void _setNMinPixels(uInt n) { _nMinPixels = n; }
00081 private:
00082         uInt _axis, _nMinPixels;
00083         Bool _decimate;
00084         ImageDecimatorData::Function _decimationFunction;
00085 
00086         // disallow default constructor
00087         Image1DSmoother();
00088 };
00089 }
00090 
00091 #ifndef AIPS_NO_TEMPLATE_SRC
00092 #include <imageanalysis/ImageAnalysis/Image1DSmoother.tcc>
00093 #endif
00094 
00095 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1