ImageRegridderBase.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef IMAGEANALYSIS_IMAGEREGRIDDERBASE_H
00027 #define IMAGEANALYSIS_IMAGEREGRIDDERBASE_H
00028
00029 #include <imageanalysis/ImageAnalysis/ImageTask.h>
00030
00031 #include <scimath/Mathematics/Interpolate2D.h>
00032 #include <casa/namespace.h>
00033
00034 namespace casa {
00035
00036 template <class T> class ImageRegridderBase : public ImageTask<T> {
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 template<typename U> friend class ImageRegridderBase;
00055
00056 public:
00057
00058 ImageRegridderBase() = delete;
00059
00060
00061 virtual ~ImageRegridderBase();
00062
00063
00064 void setSpecAsVelocity(Bool v) { _specAsVelocity = v; }
00065
00066
00067 void setMethod(const String& method) { _method = Interpolate2D::stringToMethod(method); }
00068 void setMethod(Interpolate2D::Method method) { _method = method; }
00069
00070 void setDoRefChange(Bool d) { _doRefChange = d; }
00071
00072 void setReplicate(Bool r) { _replicate = r; }
00073
00074
00075 void setDecimate(Int d);
00076
00077 void setForceRegrid(Bool f) { _forceRegrid = f; }
00078
00079 void setShape(const IPosition s) { _shape = s; }
00080
00081 virtual SPIIT regrid() const = 0;
00082
00083 template <class U> void setConfiguration(const ImageRegridderBase<U>& that);
00084
00085 protected:
00086
00087 ImageRegridderBase(
00088 const SPCIIT image, const Record *const regionRec,
00089 const String& maskInp, const String& outname, Bool overwrite,
00090 const CoordinateSystem& csys, const IPosition& axes,
00091 const IPosition& shape
00092 );
00093
00094 Interpolate2D::Method _getMethod() const { return _method; }
00095
00096 Bool _getDoRefChange() const { return _doRefChange; }
00097
00098 Bool _getReplicate() const { return _replicate; }
00099
00100 Int _getDecimate() const { return _decimate;}
00101
00102 Bool _getForceRegrid() const { return _forceRegrid; }
00103
00104 inline CasacRegionManager::StokesControl _getStokesControl() const {
00105 return CasacRegionManager::USE_ALL_STOKES;
00106 }
00107
00108 inline vector<Coordinate::Type> _getNecessaryCoordinates() const {
00109 return vector<Coordinate::Type>(0);
00110 }
00111
00112 Bool _getSpecAsVelocity() const { return _specAsVelocity; }
00113
00114 IPosition _getShape() const {return _shape;}
00115
00116 const CoordinateSystem& _getTemplateCoords() const { return _csysTo; }
00117
00118 IPosition _getAxes() const { return _axes; }
00119
00120 IPosition _getKludgedShape() const { return _kludgedShape; }
00121
00122 vector<String> _getOutputStokes() const { return _outputStokes; }
00123
00124 uInt _getNReplicatedChans() const { return _nReplicatedChans; }
00125
00126 Bool _regriddingDirectionAxes() const;
00127
00128 private:
00129 const CoordinateSystem _csysTo;
00130 IPosition _axes, _shape, _kludgedShape;
00131 Bool _specAsVelocity, _doRefChange, _replicate, _forceRegrid;
00132 Int _decimate;
00133 Interpolate2D::Method _method;
00134 vector<String> _outputStokes;
00135 uInt _nReplicatedChans;
00136
00137 void _finishConstruction();
00138
00139 };
00140 }
00141
00142 #ifndef AIPS_NO_TEMPLATE_SRC
00143 #include <imageanalysis/ImageAnalysis/ImageRegridderBase.tcc>
00144 #endif //# AIPS_NO_TEMPLATE_SRC
00145
00146 #endif