00001 //# Copyright (C) 1998,1999,2000,2001,2003 00002 //# Associated Universities, Inc. Washington DC, USA. 00003 //# 00004 //# This program is free software; you can redistribute it and/or modify it 00005 //# under the terms of the GNU General Public License as published by the Free 00006 //# Software Foundation; either version 2 of the License, or (at your option) 00007 //# any later version. 00008 //# 00009 //# This program is distributed in the hope that it will be useful, but WITHOUT 00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00012 //# more details. 00013 //# 00014 //# You should have received a copy of the GNU General Public License along 00015 //# with this program; if not, write to the Free Software Foundation, Inc., 00016 //# 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00017 //# 00018 //# Correspondence concerning AIPS++ should be addressed as follows: 00019 //# Internet email: aips2-request@nrao.edu. 00020 //# Postal address: AIPS++ Project Office 00021 //# National Radio Astronomy Observatory 00022 //# 520 Edgemont Road 00023 //# Charlottesville, VA 22903-2475 USA 00024 //# 00025 00026 #ifndef IMAGEANALYSIS_COMPLEXIMAGEREGRIDDER_H 00027 #define IMAGEANALYSIS_COMPLEXIMAGEREGRIDDER_H 00028 00029 #include <imageanalysis/ImageAnalysis/ImageRegridderBase.h> 00030 00031 #include <scimath/Mathematics/Interpolate2D.h> 00032 #include <casa/namespace.h> 00033 00034 namespace casa { 00035 00036 class ComplexImageRegridder : public ImageRegridderBase<Complex> { 00037 // <summary> 00038 // Top level interface which regrids an image with complex-valued pixels to a specified coordinate system 00039 // </summary> 00040 00041 // <reviewed reviewer="" date="" tests="" demos=""> 00042 // </reviewed> 00043 00044 // <prerequisite> 00045 // </prerequisite> 00046 00047 // <etymology> 00048 // Regrids image. 00049 // </etymology> 00050 00051 // <synopsis> 00052 // High level interface for regridding an image. Note that in the case of a complex-valued 00053 // image, the image is first divided into its composite real and imaginary parts, and these 00054 // parts are regridded independently. The resulting regridded images are combined to form 00055 // the final regridded complex-valued image. 00056 // </synopsis> 00057 00058 public: 00059 00060 // if <src>outname</src> is empty, no image will be written 00061 // if <src>overwrite</src> is True, if image already exists it will be removed 00062 // if <src>overwrite</src> is False, if image already exists exception will be thrown 00063 // <group> 00064 00065 ComplexImageRegridder( 00066 const SPCIIC image, 00067 const Record *const regionRec, 00068 const String& maskInp, const String& outname, Bool overwrite, 00069 const CoordinateSystem& csysTo, const IPosition& axes, 00070 const IPosition& shape 00071 ); 00072 00073 template <class T> ComplexImageRegridder( 00074 const SPCIIC image, const String& outname, 00075 const SPCIIT templateIm, const IPosition& axes=IPosition(), 00076 const Record *const regionRec=0, 00077 const String& maskInp="", Bool overwrite=False, 00078 const IPosition& shape=IPosition() 00079 ); 00080 // </group> 00081 00082 // destructor 00083 ~ComplexImageRegridder(); 00084 00085 // perform the regrid. 00086 SPIIC regrid() const; 00087 00088 protected: 00089 00090 String getClass() const { return _class; } 00091 00092 private: 00093 00094 static const String _class; 00095 00096 // disallow default constructor 00097 ComplexImageRegridder(); 00098 00099 }; 00100 } 00101 00102 #endif