casa
$Rev:20696$
|
00001 //# Copyright (C) 1998,1999,2000,2001 00002 //# Associated Universities, Inc. Washington DC, USA. 00003 //# 00004 //# This library is free software; you can redistribute it and/or modify it 00005 //# under the terms of the GNU Library General Public License as published by 00006 //# the Free Software Foundation; either version 2 of the License, or (at your 00007 //# option) any later version. 00008 //# 00009 //# This library is distributed in the hope that it will be useful, but WITHOUT 00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00012 //# License for more details. 00013 //# 00014 //# You should have received a copy of the GNU Library General Public License 00015 //# along with this library; if not, write to the Free Software Foundation, 00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00017 //# 00018 //# Correspondence concerning AIPS++ should be addressed as follows: 00019 //# Internet email: aips2-request@nrao.edu. 00020 //# Postal address: AIPS++ Project Office 00021 //# National Radio Astronomy Observatory 00022 //# 520 Edgemont Road 00023 //# Charlottesville, VA 22903-2475 USA 00024 //# 00025 00026 #ifndef ANNOTATIONS_ANNVECTOR_H 00027 #define ANNOTATIONS_ANNVECTOR_H 00028 00029 #include <imageanalysis/Annotations/AnnotationBase.h> 00030 00031 #include <casa/Arrays/Vector.h> 00032 #include <measures/Measures/MDirection.h> 00033 00034 namespace casa { 00035 00036 // <summary>Represents a vector annotation which has a start and ending point.</summary> 00037 00038 // <use visibility=export> 00039 00040 // <reviewed reviewer="" date="yyyy/mm/dd"> 00041 // </reviewed> 00042 00043 // <synopsis> 00044 00045 // Represents an ascii vector annotation 00046 // </synopsis> 00047 00048 class AnnVector: public AnnotationBase { 00049 public: 00050 00051 AnnVector( 00052 const Quantity& xStart, 00053 const Quantity& yStart, 00054 const Quantity& xEnd, 00055 const Quantity& yEnd, 00056 const String& dirRefFrameString, 00057 const CoordinateSystem& csys, 00058 const Quantity& beginFreq, 00059 const Quantity& endFreq, 00060 const String& freqRefFrame, 00061 const String& dopplerString, 00062 const Quantity& restfreq, 00063 const Vector<Stokes::StokesTypes>& stokes 00064 ); 00065 00066 AnnVector( 00067 const Quantity& xStart, 00068 const Quantity& yStart, 00069 const Quantity& xEnd, 00070 const Quantity& yEnd, 00071 const CoordinateSystem& csys, 00072 const Vector<Stokes::StokesTypes>& stokes 00073 ); 00074 00075 00076 // implicit copy constructor and destructor are fine 00077 00078 AnnVector& operator=(const AnnVector& other); 00079 00080 // get the end point directions, transformed to 00081 // the input coordinate system if necessary. 00082 // The first element will be the starting point, 00083 // the second the ending point. 00084 Vector<MDirection> getEndPoints() const; 00085 00086 virtual ostream& print(ostream &os) const; 00087 00088 private: 00089 AnnotationBase::Direction _inputPoints; 00090 00091 void _init( 00092 const Quantity& xBegin, const Quantity& yBegin, 00093 const Quantity& xEnd, const Quantity& yEnd 00094 ); 00095 }; 00096 00097 } 00098 00099 #endif