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

          Line data    Source code
       1             : //# ImageRotator.h
       2             : //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //#
       5             : //# This library is free software; you can redistribute it and/or modify it
       6             : //# under the terms of the GNU Library General Public License as published by
       7             : //# the Free Software Foundation; either version 2 of the License, or (at your
       8             : //# option) any later version.
       9             : //#
      10             : //# This library 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 Library General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU Library General Public License
      16             : //# along with this library; if not, write to the Free Software Foundation,
      17             : //# Inc., 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             : //# $Id: Image2DConvolver.h 20229 2008-01-29 15:19:06Z gervandiepen $
      27             : 
      28             : #ifndef IMAGES_IMAGEROTATOR_H
      29             : #define IMAGES_IMAGEROTATOR_H
      30             : 
      31             : #include <imageanalysis/ImageAnalysis/ImageTask.h>
      32             : 
      33             : #include <casacore/casa/aips.h>
      34             : 
      35             : namespace casa {
      36             : 
      37             : // <summary>
      38             : // This class rotates an image through a specified angle.
      39             : // </summary>
      40             : 
      41             : // <use visibility=export>
      42             : 
      43             : // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
      44             : // </reviewed>
      45             : 
      46             : // <prerequisite>
      47             : // </prerequisite>
      48             : 
      49             : // <etymology>
      50             : // This class rotates an image through a specified angle.
      51             : // </etymology>
      52             : 
      53             : // <synopsis>
      54             : // This class rotates an image through a specified angle.
      55             : 
      56             : // </synopsis>
      57             : 
      58             : // <example>
      59             : // <srcBlock>
      60             : // </srcBlock>
      61             : // </example>
      62             : 
      63             : // <motivation>
      64             : // users like histograms.
      65             : // </motivation>
      66             : //   <li> 
      67             : // </todo>
      68             : 
      69             : template <class T> class ImageRotator : public ImageTask<T> {
      70             : public:
      71             : 
      72             :         const static casacore::String CLASS_NAME;
      73             : 
      74             :         ImageRotator() = delete;
      75             : 
      76             :         ImageRotator(
      77             :             const SPCIIT image, const casacore::Record *const &regionPtr,
      78             :             const casacore::String& mask,const casacore::String& outname,
      79             :             casacore::Bool overwrite
      80             :         );
      81             :         
      82             :         ImageRotator(const ImageRotator &other) = delete;
      83             : 
      84             :         ~ImageRotator();
      85             : 
      86             :         ImageRotator &operator=(const ImageRotator &other) = delete;
      87             : 
      88           0 :         casacore::String getClass() const { return CLASS_NAME; }
      89             : 
      90             :         SPIIT rotate();
      91             : 
      92             :         // set angle through which to rotate the direction or linear coordinate
      93           0 :         void setAngle(const casacore::Quantity& angle) { _angle = angle; }
      94             : 
      95             :         void setDecimate(casacore::Int d) { _decimate = d; }
      96             : 
      97             :         // set the interpolation method
      98             :         void setInterpolationMethod(const casacore::String& method) {
      99             :             _method = method;
     100             :             _method.upcase();
     101             :         }
     102             : 
     103             :         void setReplicate(casacore::Bool b) { _replicate = b; }
     104             : 
     105             :         // set shape of output image
     106           0 :         void setShape(const casacore::IPosition& shape) { _shape = shape; }
     107             : 
     108             : protected:
     109             : 
     110           0 :         CasacRegionManager::StokesControl _getStokesControl() const {
     111           0 :                 return CasacRegionManager::USE_ALL_STOKES;
     112             :         }
     113             : 
     114           0 :     std::vector<casacore::Coordinate::Type> _getNecessaryCoordinates() const {
     115           0 :         return std::vector<casacore::Coordinate::Type>();
     116             :     }
     117             : 
     118           0 :     casacore::Bool _supportsMultipleRegions() const {return false;}
     119             : 
     120             : private:
     121             :     casacore::IPosition _shape;
     122             :     casacore::String _method = "cubic";
     123             :     casacore::Quantity _angle = casacore::Quantity(0, "deg");
     124             :     casacore::Int _decimate = 0;
     125             :     casacore::Bool _replicate = false;
     126             : 
     127             : };
     128             : 
     129             : }
     130             : 
     131             : #ifndef AIPS_NO_TEMPLATE_SRC
     132             : #include <imageanalysis/ImageAnalysis/ImageRotator.tcc>
     133             : #endif
     134             : 
     135             : #endif

Generated by: LCOV version 1.16