LCOV - code coverage report
Current view: top level - imageanalysis/ImageAnalysis - ImageTransposer.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 6 0.0 %
Date: 2024-10-10 19:51:30 Functions: 0 3 0.0 %

          Line data    Source code
       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: casa-feedback@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             : 
      32             : #include <imageanalysis/ImageAnalysis/ImageTask.h>
      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.
      64             :         ImageTransposer(
      65             :                         const SPCIIF image,
      66             :                 casacore::uInt order, const casacore::String& outputImage
      67             :         );
      68             : 
      69             :         // This constructor allows both transposing and inverting of axes
      70             :         ImageTransposer(
      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
      76             :         ImageTransposer(
      77             :                         const SPCIIF image,
      78             :                 const casacore::Vector<casacore::String> order, const casacore::String& outputImage
      79             :         );
      80             :         // destructor
      81             :         ~ImageTransposer();
      82             : 
      83             :         // transpose the axes and write the output image. Returns the associated casacore::PagedImage object.
      84             :         SPIIF transpose() const;
      85             : 
      86           0 :         inline casacore::String getClass() const {
      87           0 :                 return _class;
      88             :         }
      89             : 
      90             : protected:
      91           0 :         inline  CasacRegionManager::StokesControl _getStokesControl() const {
      92           0 :                 return CasacRegionManager::USE_ALL_STOKES;
      93             :         }
      94             : 
      95           0 :         inline std::vector<casacore::Coordinate::Type> _getNecessaryCoordinates() const {
      96           0 :                 return std::vector<casacore::Coordinate::Type>(0);
      97             :         }
      98             : 
      99             : private:
     100             :         casacore::Vector<casacore::Int> _order;
     101             :         casacore::IPosition _reverse;
     102             :         static const casacore::String _class;
     103             : 
     104             :         casacore::Vector<casacore::Int> _getOrder(casacore::uInt order) const;
     105             : 
     106             :         casacore::Vector<casacore::Int> _getOrder(const casacore::String& order);
     107             : };
     108             : }
     109             : 
     110             : 
     111             : #endif /* IMAGETRANSPOSER_H_ */

Generated by: LCOV version 1.16