casa
$Rev:20696$
|
00001 //#ImageReorderer.h 00002 //# 00003 //# Copyright (C) 1998,1999,2000,2001,2003 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 //# Created on: May 7, 2010 00027 //# Author: dmehring 00028 00029 #ifndef IMAGETRANSPOSER_H_ 00030 #define IMAGETRANSPOSER_H_ 00031 00032 #include <imageanalysis/ImageAnalysis/ImageTask.h> 00033 #include <memory> 00034 00035 namespace casa { 00036 class ImageTransposer : public ImageTask { 00037 // <summary> 00038 // Top level interface for transposing image axes 00039 // </summary> 00040 00041 // <reviewed reviewer="" date="" tests="" demos=""> 00042 // </reviewed> 00043 00044 // <prerequisite> 00045 // </prerequisite> 00046 00047 // <etymology> 00048 // Reorders images axes. 00049 // </etymology> 00050 00051 // <synopsis> 00052 // ImageReorderer is the top level interface for transposing image axes. 00053 // </synopsis> 00054 00055 // <example> 00056 // <srcblock> 00057 // ImageTransposer transposer(...) 00058 // reorderer.reorder(); 00059 // </srcblock> 00060 // </example> 00061 public: 00062 // This constructor only allows transposing of axes, it does 00063 // not allow inverting. 00064 ImageTransposer( 00065 const ImageInterface<Float> *const &image, 00066 uInt order, const String& outputImage 00067 ); 00068 00069 // This constructor allows both transposing and inverting of axes 00070 ImageTransposer( 00071 const ImageInterface<Float> *const &image, 00072 const String& order, const String& outputImage 00073 ); 00074 00075 // This constructor allows both transposing and inverting of axes 00076 ImageTransposer( 00077 const ImageInterface<Float> *const &image, 00078 const Vector<String> order, const String& outputImage 00079 ); 00080 // destructor 00081 ~ImageTransposer(); 00082 00083 // transpose the axes and write the output image. Returns the associated PagedImage object. 00084 ImageInterface<Float>* transpose() const; 00085 00086 inline String getClass() const { 00087 return _class; 00088 } 00089 00090 protected: 00091 inline CasacRegionManager::StokesControl _getStokesControl() const { 00092 return CasacRegionManager::USE_ALL_STOKES; 00093 } 00094 00095 inline vector<Coordinate::Type> _getNecessaryCoordinates() const { 00096 return vector<Coordinate::Type>(0); 00097 } 00098 00099 private: 00100 Vector<Int> _order; 00101 IPosition _reverse; 00102 static const String _class; 00103 00104 Vector<Int> _getOrder(uInt order) const; 00105 00106 Vector<Int> _getOrder(const String& order); 00107 }; 00108 } 00109 00110 00111 #endif /* IMAGETRANSPOSER_H_ */