AnnCircle.h

Go to the documentation of this file.
00001 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00002 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00003 //# License for more details.
00004 //#
00005 //# You should have received a copy of the GNU Library General Public License
00006 //# along with this library; if not, write to the Free Software Foundation,
00007 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00008 //#
00009 //# Correspondence concerning AIPS++ should be addressed as follows:
00010 //#        Internet email: aips2-request@nrao.edu.
00011 //#        Postal address: AIPS++ Project Office
00012 //#                        National Radio Astronomy Observatory
00013 //#                        520 Edgemont Road
00014 //#                        Charlottesville, VA 22903-2475 USA
00015 //#
00016 
00017 #ifndef ANNOTATIONS_ANNCIRCLE_H
00018 #define ANNOTATIONS_ANNCIRCLE_H
00019 
00020 #include <casa/aips.h>
00021 #include <imageanalysis/Annotations/AnnRegion.h>
00022 
00023 namespace casa {
00024 
00025 // <summary>
00026 // This class represents an annotation for a circular (in position coordinates) region specified
00027 // in an ascii region file as proposed in CAS-2285. It is specified by its center position
00028 // and radius.
00029 // </summary>
00030 // <author>Dave Mehringer</author>
00031 // <use visibility=export>
00032 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00033 // </reviewed>
00034 // <prerequisite>
00035 
00036 // </prerequisite>
00037 
00038 // <etymology>
00039 // Holds the specification of an annotation of a circular region as specified in ASCII format.
00040 // Specified by center position and radius.
00041 // </etymology>
00042 
00043 // <synopsis>
00044 // This class represents an annotation of a circular region in coordinate space specified by
00045 // center and radius. Note that this represents a world coordinate region, even if the input
00046 // radius is in pixels. If the direction coordinate does not have square pixels, then
00047 // AnnEllipse should be used instead.
00048 // </synopsis>
00049 
00050 class AnnCircle: public AnnRegion {
00051 
00052 public:
00053 
00054         AnnCircle(
00055                 const Quantity& xcenter,
00056                 const Quantity& ycneter,
00057                 const Quantity& radius,
00058                 const String& dirRefFrameString,
00059                 const CoordinateSystem& csys,
00060                 const IPosition& imShape,
00061                 const Quantity& beginFreq,
00062                 const Quantity& endFreq,
00063                 const String& freqRefFrameString,
00064                 const String& dopplerString,
00065                 const Quantity& restfreq,
00066                 const Vector<Stokes::StokesTypes> stokes,
00067                 const Bool annotationOnly
00068         );
00069 
00070         // Simplified constructor.
00071         // all frequencies are used (these can be set after construction).
00072         // xcenter and ycenter
00073         // must be in the same frame as the csys direction coordinate.
00074         // is a region (not just an annotation), although this value can be changed after
00075         // construction.
00076         AnnCircle(
00077                 const Quantity& xcenter,
00078                 const Quantity& ycneter,
00079                 const Quantity& radius,
00080                 const CoordinateSystem& csys,
00081                 const IPosition& imShape,
00082                 const Vector<Stokes::StokesTypes>& stokes
00083         );
00084 
00085         // implicit copy constructor and destructor are fine
00086 
00087         AnnCircle& operator=(const AnnCircle& other);
00088 
00089         // get center position, converted to the reference frame
00090         // of the coordinate system if necessary
00091         MDirection getCenter() const;
00092 
00093         // get the radius of the circle with angular units
00094         Quantity getRadius() const;
00095 
00096         virtual ostream& print(ostream &os) const;
00097 
00098 private:
00099         AnnotationBase::Direction _inputCenter;
00100         Quantity _inputRadius, _convertedRadius;
00101 
00102         void _init(const Quantity& xcenter, const Quantity& ycenter);
00103 
00104 };
00105 
00106 }
00107 
00108 #endif /* ASCIICIRCLEREGION_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1