00001 //# ImageAnalysis.h: Image analysis and handling tool 00002 //# Copyright (C) 2007 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This program is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU General Public License as published by the Free 00007 //# Software Foundation; either version 2 of the License, or (at your option) 00008 //# any later version. 00009 //# 00010 //# This program 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 General Public License for 00013 //# more details. 00014 //# 00015 //# You should have received a copy of the GNU General Public License along 00016 //# with this program; if not, write to the Free Software Foundation, Inc., 00017 //# 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 #ifndef _IMAGEANALYSIS__H__ 00027 #define _IMAGEANALYSIS__H__ 00028 00029 // PLEASE DO *NOT* ADD ADDITIONAL METHODS TO THIS CLASS 00030 00031 #include <casa/Quanta/Quantum.h> 00032 00033 #include <imageanalysis/ImageTypedefs.h> 00034 00035 #include <utility> 00036 00037 namespace casa { 00038 00039 class CoordinateSystem; 00040 class ImageMomentsProgressMonitor; 00041 class ImageRegion; 00042 class LatticeExprNode; 00043 class LELImageCoord; 00044 class RecordInterface; 00045 00046 //template<class T> class ImageHistograms; 00047 00048 // <summary> 00049 // Image analysis and handling tool 00050 // </summary> 00051 00052 // <synopsis> 00053 // This the casapy image tool. 00054 // One time it should be merged with pyrap's image tool ImageProxy. 00055 // </synopsis> 00056 00057 // NOTE: NEW METHODS SHOULD NOT BE ADDED TO THIS CLASS. PLEASE USE THE ImageTask.h 00058 // architecture for adding new functionality for image analysis. If you do not understand, 00059 // please consult with me, dmehring@nrao.edu. If you add new methods to ImageAnalysis, I will contact 00060 // you to remove them. Please save us both the annoyance of that. 00061 00062 class ImageAnalysis { 00063 public: 00064 00065 ImageAnalysis(); 00066 00067 ImageAnalysis(SPIIF image); 00068 00069 ImageAnalysis(SPIIC image); 00070 00071 virtual ~ImageAnalysis(); 00072 00073 /* 00074 inline static String className() {const static String x = "ImageAnalysis"; return x; } 00075 00076 // get the associated ImageInterface object 00077 */ 00078 SPCIIF getImage() const; 00079 /* 00080 SPIIF getImage(); 00081 00082 SPCIIC getComplexImage() const; 00083 00084 SPIIC getComplexImage(); 00085 00086 Bool isFloat() const { return _imageFloat ? true : false; } 00087 */ 00088 private: 00089 SPIIF _imageFloat; 00090 SPIIC _imageComplex; 00091 00092 std::unique_ptr<LogIO> _log; 00093 00094 IPosition last_chunk_shape_p; 00095 00096 void _onlyFloat(const String& method) const; 00097 00098 template<class T> static void _destruct(ImageInterface<T>& image); 00099 00100 }; 00101 00102 } 00103 00104 #ifndef AIPS_NO_TEMPLATE_SRC 00105 #include <imageanalysis/ImageAnalysis/ImageAnalysis2.tcc> 00106 #endif //# AIPS_NO_TEMPLATE_SRC 00107 00108 #endif