casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageTransposer.h
Go to the documentation of this file.
1 //#ImageReorderer.h
2 //#
3 //# Copyright (C) 1998,1999,2000,2001,2003 Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This program is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU General Public License as published by the Free
7 //# Software Foundation; either version 2 of the License, or (at your option)
8 //# any later version.
9 //#
10 //# This program is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 //# more details.
14 //#
15 //# You should have received a copy of the GNU General Public License along
16 //# with this program; if not, write to the Free Software Foundation, Inc.,
17 //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# Created on: May 7, 2010
27 //# Author: dmehring
28 
29 #ifndef IMAGETRANSPOSER_H_
30 #define IMAGETRANSPOSER_H_
31 
33 #include <memory>
34 
35 namespace casa {
36 class ImageTransposer : public ImageTask<casacore::Float> {
37  // <summary>
38  // Top level interface for transposing image axes
39  // </summary>
40 
41  // <reviewed reviewer="" date="" tests="" demos="">
42  // </reviewed>
43 
44  // <prerequisite>
45  // </prerequisite>
46 
47  // <etymology>
48  // Reorders images axes.
49  // </etymology>
50 
51  // <synopsis>
52  // ImageReorderer is the top level interface for transposing image axes.
53  // </synopsis>
54 
55  // <example>
56  // <srcblock>
57  // ImageTransposer transposer(...)
58  // reorderer.reorder();
59  // </srcblock>
60  // </example>
61 public:
62  // This constructor only allows transposing of axes, it does
63  // not allow inverting.
65  const SPCIIF image,
66  casacore::uInt order, const casacore::String& outputImage
67  );
68 
69  // This constructor allows both transposing and inverting of axes
71  const SPCIIF image,
72  const casacore::String& order, const casacore::String& outputImage
73  );
74 
75  // This constructor allows both transposing and inverting of axes
77  const SPCIIF image,
78  const casacore::Vector<casacore::String> order, const casacore::String& outputImage
79  );
80  // destructor
82 
83  // transpose the axes and write the output image. Returns the associated casacore::PagedImage object.
84  SPIIF transpose() const;
85 
86  inline casacore::String getClass() const {
87  return _class;
88  }
89 
90 protected:
93  }
94 
95  inline std::vector<casacore::Coordinate::Type> _getNecessaryCoordinates() const {
96  return std::vector<casacore::Coordinate::Type>(0);
97  }
98 
99 private:
102  static const casacore::String _class;
103 
105 
107 };
108 }
109 
110 
111 #endif /* IMAGETRANSPOSER_H_ */
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
CasacRegionManager::StokesControl _getStokesControl() const
SPIIF transpose() const
transpose the axes and write the output image.
casacore::String getClass() const
~ImageTransposer()
destructor
std::shared_ptr< const casacore::ImageInterface< casacore::Float > > SPCIIF
Definition: ImageTypedefs.h:50
casacore::Vector< casacore::Int > _order
std::shared_ptr< casacore::ImageInterface< casacore::Float > > SPIIF
Definition: ImageTypedefs.h:51
casacore::Vector< casacore::Int > _getOrder(casacore::uInt order) const
String: the storage and methods of handling collections of characters.
Definition: String.h:223
static const casacore::String _class
ImageTransposer(const SPCIIF image, casacore::uInt order, const casacore::String &outputImage)
Top level interface for transposing image axes.
std::vector< casacore::Coordinate::Type > _getNecessaryCoordinates() const
Represents the minimum set of coordinates necessary for the task to function.
casacore::IPosition _reverse
unsigned int uInt
Definition: aipstype.h:51