casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::AnnRotBox Class Reference

This class represents an annotation for rectangular (in position coordinates) region specified in an ascii region file as proposed in CAS-2285. It is specified by its center position and side widths and a position angle. <author>Dave Mehringer</author> More...

#include <AnnRotBox.h>

Inheritance diagram for casa::AnnRotBox:
casa::AnnRegion casa::AnnotationBase

List of all members.

Public Member Functions

 AnnRotBox (const Quantity &xcenter, const Quantity &ycenter, const Quantity &xwidth, const Quantity &ywidth, const Quantity &positionAngle, const String &dirRefFrameString, const CoordinateSystem &csys, const IPosition &imShape, const Quantity &beginFreq, const Quantity &endFreq, const String &freqRefFrameString, const String &dopplerString, const Quantity &restfreq, const Vector< Stokes::StokesTypes > stokes, const Bool annotationOnly)
 positionAngle is measured in the usual astronomical way; starting at north through east (counterclockwise)
 AnnRotBox (const Quantity &xcenter, const Quantity &ycenter, const Quantity &xwidth, const Quantity &ywidth, const Quantity &positionAngle, const CoordinateSystem &csys, const IPosition &imShape, const Vector< Stokes::StokesTypes > &stokes)
 Simplified constructor.
AnnRotBoxoperator= (const AnnRotBox &other)
 implicit copy constructor and destructor are fine
Vector< MDirectiongetCorners () const
 get the four corners of the box in direction space.
void worldBoundingBox (vector< Quantity > &blc, vector< Quantity > &trc) const
void worldCorners (vector< Quantity > &x, vector< Quantity > &y) const
 get the world coordinates of the polygon vertices
void pixelCorners (vector< Double > &x, vector< Double > &y) const
 get the pixel coordinates of the polygon vertices
virtual ostream & print (ostream &os) const

Private Member Functions

void _init (const Quantity &xcenter, const Quantity &ycenter, const Quantity &xwidth, const Quantity &ywidth)
void _doCorners ()

Private Attributes

AnnotationBase::Direction _inputCenter
Vector< Quantity_inputWidths
Vector< Quantity_widths
Quantity _positionAngle
Vector< MDirection_corners

Detailed Description

This class represents an annotation for rectangular (in position coordinates) region specified in an ascii region file as proposed in CAS-2285. It is specified by its center position and side widths and a position angle. <author>Dave Mehringer</author>

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

Holds the specification of an annotation for a rectangular region as specified in ASCII format. Specified by center position and widths of sides and a position angle

Synopsis

This class represents an annotation for a rectangular region in coordinate space specified by center and widths of sides and a position angle.

Definition at line 49 of file AnnRotBox.h.


Constructor & Destructor Documentation

casa::AnnRotBox::AnnRotBox ( const Quantity xcenter,
const Quantity ycenter,
const Quantity xwidth,
const Quantity ywidth,
const Quantity positionAngle,
const String dirRefFrameString,
const CoordinateSystem csys,
const IPosition imShape,
const Quantity beginFreq,
const Quantity endFreq,
const String freqRefFrameString,
const String dopplerString,
const Quantity restfreq,
const Vector< Stokes::StokesTypes stokes,
const Bool  annotationOnly 
)

positionAngle is measured in the usual astronomical way; starting at north through east (counterclockwise)

casa::AnnRotBox::AnnRotBox ( const Quantity xcenter,
const Quantity ycenter,
const Quantity xwidth,
const Quantity ywidth,
const Quantity positionAngle,
const CoordinateSystem csys,
const IPosition imShape,
const Vector< Stokes::StokesTypes > &  stokes 
)

Simplified constructor.

all frequencies are used (these can be set after construction). xcenter and ycenter must be in the same frame as the csys direction coordinate. is a region (not just an annotation), although this value can be changed after construction.


Member Function Documentation

void casa::AnnRotBox::_doCorners ( ) [private]
void casa::AnnRotBox::_init ( const Quantity xcenter,
const Quantity ycenter,
const Quantity xwidth,
const Quantity ywidth 
) [private]

get the four corners of the box in direction space.

These will have been converted to the frame of the coordinate system if necessary. The only thing about the order of the vector that is garaunteed is that adjacent entries in the returned Vector will not be diagonally opposite corners.

AnnRotBox& casa::AnnRotBox::operator= ( const AnnRotBox other)

implicit copy constructor and destructor are fine

void casa::AnnRotBox::pixelCorners ( vector< Double > &  x,
vector< Double > &  y 
) const

get the pixel coordinates of the polygon vertices

virtual ostream& casa::AnnRotBox::print ( ostream &  os) const [virtual]

Implements casa::AnnotationBase.

void casa::AnnRotBox::worldBoundingBox ( vector< Quantity > &  blc,
vector< Quantity > &  trc 
) const
void casa::AnnRotBox::worldCorners ( vector< Quantity > &  x,
vector< Quantity > &  y 
) const

get the world coordinates of the polygon vertices


Member Data Documentation

Definition at line 115 of file AnnRotBox.h.

Definition at line 111 of file AnnRotBox.h.

Definition at line 112 of file AnnRotBox.h.

Definition at line 114 of file AnnRotBox.h.

Definition at line 113 of file AnnRotBox.h.


The documentation for this class was generated from the following file: