casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageRegridderBase.h
Go to the documentation of this file.
1 //# Copyright (C) 1998,1999,2000,2001,2003
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This program is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU General Public License as published by the Free
6 //# Software Foundation; either version 2 of the License, or (at your option)
7 //# any later version.
8 //#
9 //# This program is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 //# more details.
13 //#
14 //# You should have received a copy of the GNU General Public License along
15 //# with this program; if not, write to the Free Software Foundation, Inc.,
16 //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 
26 #ifndef IMAGEANALYSIS_IMAGEREGRIDDERBASE_H
27 #define IMAGEANALYSIS_IMAGEREGRIDDERBASE_H
28 
31 #include <casa/namespace.h>
32 
33 namespace casa {
34 
35 template <class T> class ImageRegridderBase : public ImageTask<T> {
36  // <summary>
37  // casacore::Data store of ImageRegridder and ComplexImageRegridder
38  // TODO ComplexImageRegridder has been removed so this class can probably
39  // be merged into ImageRegridder
40  // </summary>
41 
42  // <reviewed reviewer="" date="" tests="" demos="">
43  // </reviewed>
44 
45  // <prerequisite>
46  // </prerequisite>
47 
48  // <etymology>
49  // casacore::Data for image regridder.
50  // </etymology>
51 
52  // <synopsis>
53  // </synopsis>
54 
55  template<typename U> friend class ImageRegridderBase;
56 
57 public:
58 
59  ImageRegridderBase() = delete;
60 
61  // destructor
62  virtual ~ImageRegridderBase();
63 
64  // regrid the spectral axis in velocity space rather than frequency space?
66 
67  // Set interpolation method.
68  void setMethod(const casacore::String& method) {
70  }
71 
73 
75 
77 
78  // throws exception if 3*decimate > length of an axis that will be regridded
79  void setDecimate(casacore::Int d);
80 
82 
83  void setShape(const casacore::IPosition s) { _shape = s; }
84 
85  virtual SPIIT regrid() const = 0;
86 
87  template <class U> void setConfiguration(const ImageRegridderBase<U>& that);
88 
89 protected:
90 
92  const SPCIIT image, const casacore::Record *const regionRec,
93  const casacore::String& maskInp, const casacore::String& outname,
94  casacore::Bool overwrite, const casacore::CoordinateSystem& csys,
96  );
97 
99 
101 
103 
105 
107 
110  }
111 
112  inline std::vector<casacore::Coordinate::Type> _getNecessaryCoordinates() const {
113  return std::vector<casacore::Coordinate::Type>(0);
114  }
115 
117 
119 
121  return _csysTo;
122  }
123 
124  casacore::IPosition _getAxes() const { return _axes; }
125 
127 
128  std::vector<casacore::String> _getOutputStokes() const { return _outputStokes; }
129 
131 
133 
134 private:
140  std::vector<casacore::String> _outputStokes;
142 
143  void _finishConstruction();
144 
145 };
146 }
147 
148 #ifndef AIPS_NO_TEMPLATE_SRC
149 #include <imageanalysis/ImageAnalysis/ImageRegridderBase.tcc>
150 #endif //# AIPS_NO_TEMPLATE_SRC
151 
152 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
casacore::Bool _regriddingDirectionAxes() const
int Int
Definition: aipstype.h:50
static Interpolate2D::Method stringToMethod(const String &method)
Convert string (&quot;nearest&quot;, &quot;linear&quot;, &quot;cubic&quot;, &quot;lanczos&quot;) to interpolation method. ...
casacore::IPosition _getShape() const
void setShape(const casacore::IPosition s)
std::vector< casacore::String > _getOutputStokes() const
void setForceRegrid(casacore::Bool f)
void setDecimate(casacore::Int d)
throws exception if 3*decimate &gt; length of an axis that will be regridded
casacore::Bool _getForceRegrid() const
casacore::Interpolate2D::Method _method
casacore::IPosition _axes
void setReplicate(casacore::Bool r)
std::vector< casacore::String > _outputStokes
casacore::IPosition _shape
void setDoRefChange(casacore::Bool d)
virtual ~ImageRegridderBase()
destructor
void setConfiguration(const ImageRegridderBase< U > &that)
#define SPIIT
Definition: ImageTypedefs.h:34
casacore::uInt _getNReplicatedChans() const
casacore::Bool _getReplicate() const
casacore::Bool _getDoRefChange() const
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
const casacore::CoordinateSystem & _getTemplateCoords() const
casacore::Int _getDecimate() const
#define SPCIIT
Definition: ImageTypedefs.h:35
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
Definition: ExprNode.h:1944
virtual SPIIT regrid() const =0
std::vector< casacore::Coordinate::Type > _getNecessaryCoordinates() const
Represents the minimum set of coordinates necessary for the task to function.
casacore::IPosition _getKludgedShape() const
casacore::Interpolate2D::Method _getMethod() const
casacore::IPosition _kludgedShape
void setSpecAsVelocity(casacore::Bool v)
regrid the spectral axis in velocity space rather than frequency space?
CasacRegionManager::StokesControl _getStokesControl() const
void setMethod(const casacore::String &method)
Set interpolation method.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void setMethod(casacore::Interpolate2D::Method method)
casacore::IPosition _getAxes() const
const casacore::CoordinateSystem _csysTo
casacore::Bool _getSpecAsVelocity() const
Interconvert pixel and world coordinates.
unsigned int uInt
Definition: aipstype.h:51