LCOV - code coverage report
Current view: top level - imageanalysis/Annotations - AnnLine.cc (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 35 0.0 %
Date: 2024-10-10 19:51:30 Functions: 0 5 0.0 %

          Line data    Source code
       1             : //# GaussianShape.cc:
       2             : //# Copyright (C) 1998,1999,2000
       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             : 
      27             : #include <imageanalysis/Annotations/AnnLine.h>
      28             : 
      29             : using namespace casacore;
      30             : namespace casa {
      31             : 
      32           0 : AnnLine::AnnLine(
      33             :         const Quantity& xPoint1,
      34             :         const Quantity& yPoint1,
      35             :         const Quantity& xPoint2,
      36             :         const Quantity& yPoint2,
      37             :         const String& dirRefFrameString,
      38             :         const CoordinateSystem& csys,
      39             :         const Quantity& beginFreq,
      40             :         const Quantity& endFreq,
      41             :         const String& freqRefFrame,
      42             :         const String& dopplerString,
      43             :         const Quantity& restfreq,
      44             :         const Vector<Stokes::StokesTypes>& stokes
      45           0 : ) : AnnotationBase(
      46             :                 LINE, dirRefFrameString, csys, beginFreq, endFreq,
      47             :                 freqRefFrame, dopplerString, restfreq, stokes
      48             :         ),
      49           0 :         _inputPoints(AnnotationBase::Direction(2)) {
      50             : 
      51           0 :         _inputPoints(0).first = xPoint1;
      52           0 :         _inputPoints(0).second = yPoint1;
      53           0 :         _inputPoints(1).first = xPoint2;
      54           0 :         _inputPoints(1).second = yPoint2;
      55           0 :         _checkAndConvertDirections(String(__FUNCTION__), _inputPoints);
      56           0 : }
      57             : 
      58           0 : AnnLine::AnnLine(
      59             :         const Quantity& xPoint1,
      60             :         const Quantity& yPoint1,
      61             :         const Quantity& xPoint2,
      62             :         const Quantity& yPoint2,
      63             :         const CoordinateSystem& csys,
      64             :         const Vector<Stokes::StokesTypes>& stokes
      65             : 
      66           0 : ) : AnnotationBase(LINE, csys, stokes),
      67           0 :         _inputPoints(AnnotationBase::Direction(2)) {
      68             : 
      69           0 :         _inputPoints(0).first = xPoint1;
      70           0 :         _inputPoints(0).second = yPoint1;
      71           0 :         _inputPoints(1).first = xPoint2;
      72           0 :         _inputPoints(1).second = yPoint2;
      73           0 :         _checkAndConvertDirections(String(__FUNCTION__), _inputPoints);
      74           0 : }
      75             : 
      76           0 : AnnLine& AnnLine::operator= (
      77             :         const AnnLine& other
      78             : ) {
      79           0 :     if (this == &other) {
      80           0 :         return *this;
      81             :     }
      82           0 :     AnnotationBase::operator=(other);
      83           0 :     _inputPoints.resize(other._inputPoints.size());
      84           0 :     _inputPoints = other._inputPoints;
      85           0 :     return *this;
      86             : }
      87             : 
      88           0 : Vector<MDirection> AnnLine::getEndPoints() const {
      89           0 :         return getConvertedDirections();
      90             : }
      91             : 
      92           0 : ostream& AnnLine::print(ostream &os) const {
      93           0 :         os << "line [["
      94           0 :                 << _printDirection(_inputPoints(0).first, _inputPoints(0).second)
      95           0 :                 << "], ["
      96           0 :                 << _printDirection(_inputPoints(1).first, _inputPoints(1).second)
      97           0 :                 << "]]";
      98           0 :         _printPairs(os);
      99           0 :         return os;
     100             : }
     101             : 
     102             : 
     103             : }
     104             : 
     105             : 

Generated by: LCOV version 1.16