ImageConvolverTask.h

Go to the documentation of this file.
00001 //# Image2DConvolver.h: 2D convolution of an image
00002 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: Image2DConvolver.h 20229 2008-01-29 15:19:06Z gervandiepen $
00027 
00028 #ifndef IMAGES_IMAGECONVOLVERTASK_H
00029 #define IMAGES_IMAGECONVOLVERTASK_H
00030 
00031 #include <imageanalysis/ImageAnalysis/ImageTask.h>
00032 
00033 #include <casa/aips.h>
00034 
00035 namespace casa {
00036 
00037 // <summary>
00038 // This class is the high level interface to image convolving
00039 // </summary>
00040 
00041 // <use visibility=export>
00042 
00043 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00044 // </reviewed>
00045 
00046 // <prerequisite>
00047 //   <li> <linkto class="ImageInterface">ImageInterface</linkto>
00048 //   <li> <linkto class="Convolver">Convolver</linkto>
00049 // </prerequisite>
00050 
00051 // <etymology>
00052 // This class is the high level interface to image convolving
00053 // </etymology>
00054 
00055 // <synopsis>
00056 // This class is the high level interface to image convolving
00057 // </synopsis>
00058 
00059 // <example>
00060 // <srcBlock>
00061 // </srcBlock>
00062 // </example>
00063 
00064 // <motivation>
00065 // Convolution is a standard image processing requirement.
00066 // </motivation>
00067 
00068 // <todo asof="2001/08/28">
00069 //   <li> 
00070 // </todo>
00071 
00072 template <class T> class ImageConvolverTask : public ImageTask<T> {
00073 public:
00074 
00075         const static String CLASS_NAME;
00076 
00077         ImageConvolverTask() = delete;
00078 
00079         ImageConvolverTask(
00080                 const SPCIIT image, const Record *const &regionPtr,
00081             const String& mask, const String& outname, const Bool overwrite
00082         );
00083         
00084     ImageConvolverTask(const ImageConvolverTask<T> &other) = delete;
00085 
00086         ~ImageConvolverTask() {}
00087 
00088         ImageConvolverTask &operator=(const ImageConvolverTask<T> &other) = delete;
00089 
00090         SPIIT convolve();
00091 
00092         void setKernel(const Array<T>& kernel);
00093 
00094         void setKernel(SPIIT image) { setKernel(image->get()); }
00095 
00096         void setScale(Double d) { _scale = d; }
00097 
00098         String getClass() const { return CLASS_NAME; }
00099 
00100 protected:
00101 
00102         CasacRegionManager::StokesControl _getStokesControl() const {
00103                 return CasacRegionManager::USE_ALL_STOKES;
00104         }
00105 
00106     vector<Coordinate::Type> _getNecessaryCoordinates() const {
00107         return vector<Coordinate::Type>();
00108     }
00109 
00110     inline Bool _supportsMultipleRegions() const {return True;}
00111 
00112 private:
00113     Array<T> _kernel;
00114     Double _scale;
00115 
00116 };
00117 
00118 }
00119 
00120 #ifndef CASACORE_NO_AUTO_TEMPLATES
00121 #include <imageanalysis/ImageAnalysis/ImageConvolverTask.tcc>
00122 #endif //# CASACORE_NO_AUTO_TEMPLATES
00123 #endif
00124 
00125 
00126 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1