00001 #ifndef IMAGEANALYSIS_TWOPOINTCORRELATOR_H 00002 #define IMAGEANALYSIS_TWOPOINTCORRELATOR_H 00003 00004 #include <lattices/LatticeMath/LatticeTwoPtCorr.h> 00005 00006 #include <imageanalysis/ImageAnalysis/ImageTask.h> 00007 00008 #include <casa/namespace.h> 00009 00010 namespace casa { 00011 00012 template <class T> class TwoPointCorrelator : public ImageTask<T> { 00013 // <summary> 00014 // Top level interface for two point correlation 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 // </synopsis> 00029 00030 public: 00031 00032 TwoPointCorrelator() = delete; 00033 00034 TwoPointCorrelator( 00035 SPCIIT image, const Record *const region, const String& mask, 00036 const String& outname, Bool overwrite 00037 ); 00038 00039 // destructor 00040 ~TwoPointCorrelator() {} 00041 00042 SPIIT correlate(); 00043 00044 String getClass() const { const static String s = "TwoPointCorrelator"; return s; } 00045 00046 // Set the pixel axes over which to do correlation 00047 void setAxes(const IPosition& axes); 00048 00049 void setMethod(const String& method) { 00050 _method = LatticeTwoPtCorr<T>::fromString(method); 00051 } 00052 00053 protected: 00054 00055 inline CasacRegionManager::StokesControl _getStokesControl() const { 00056 return CasacRegionManager::USE_ALL_STOKES; 00057 } 00058 00059 inline std::vector<Coordinate::Type> _getNecessaryCoordinates() const { 00060 return std::vector<Coordinate::Type>(); 00061 } 00062 00063 inline Bool _supportsMultipleBeams() const {return True;} 00064 00065 private: 00066 IPosition _axes = IPosition(); 00067 typename LatticeTwoPtCorr<T>::Method _method = LatticeTwoPtCorr<T>::STRUCTUREFUNCTION; 00068 00069 }; 00070 } 00071 00072 #ifndef AIPS_NO_TEMPLATE_SRC 00073 #include <imageanalysis/ImageAnalysis/TwoPointCorrelator.tcc> 00074 #endif 00075 00076 #endif