casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
AnnLine.h
Go to the documentation of this file.
00001 //# ComponentShape.h: Base class for component shapes
00002 //# Copyright (C) 1998,1999,2000,2001
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library 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 Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 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 //# $Id: ComponentShape.h 20739 2009-09-29 01:15:15Z Malte.Marquarding $
00027 
00028 #ifndef ANNOTATIONS_ANNLINE_H
00029 #define ANNOTATIONS_ANNLINE_H
00030 
00031 #include <imageanalysis/Annotations/AnnotationBase.h>
00032 
00033 #include <casa/Arrays/Vector.h>
00034 #include <measures/Measures/MDirection.h>
00035 
00036 namespace casa {
00037 
00038 // <summary>Represents a line annotation</summary>
00039 
00040 // <use visibility=export>
00041 
00042 // <reviewed reviewer="" date="yyyy/mm/dd">
00043 // </reviewed>
00044 
00045 // <synopsis>
00046 
00047 // Represents an ascii line annotation
00048 // </synopsis>
00049 
00050 class AnnLine: public AnnotationBase {
00051 public:
00052 
00053         AnnLine(
00054                 const Quantity& xPoint1,
00055                 const Quantity& yPoint1,
00056                 const Quantity& xPoint2,
00057                 const Quantity& yPoint2,
00058                 const String& dirRefFrameString,
00059                 const CoordinateSystem& csys,
00060                 const Quantity& beginFreq,
00061                 const Quantity& endFreq,
00062                 const String& freqRefFrame,
00063                 const String& dopplerString,
00064                 const Quantity& restfreq,
00065                 const Vector<Stokes::StokesTypes>& stokes
00066         );
00067 
00068         // simplified constructor. Direction quantities must be in the same reference frame as
00069         // <src>csys</src> and all frequencies are valid.
00070         AnnLine(
00071                 const Quantity& xPoint1,
00072                 const Quantity& yPoint1,
00073                 const Quantity& xPoint2,
00074                 const Quantity& yPoint2,
00075                 const CoordinateSystem& csys,
00076                 const Vector<Stokes::StokesTypes>& stokes
00077         );
00078 
00079         // implicit copy constructor and destructor are fine
00080 
00081         AnnLine& operator=(const AnnLine& other);
00082 
00083         // get the end point directions, transformed to
00084         // the input coordinate system if necessary
00085         Vector<MDirection> getEndPoints() const;
00086 
00087         virtual ostream& print(ostream &os) const;
00088 
00089 protected:
00090         AnnotationBase::Direction _inputPoints;
00091 
00092 };
00093 
00094 }
00095 
00096 #endif