casa
$Rev:20696$
|
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>
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. | |
AnnRotBox & | operator= (const AnnRotBox &other) |
implicit copy constructor and destructor are fine | |
Vector< MDirection > | getCorners () 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 |
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>
Public interface
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
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.
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.
void casa::AnnRotBox::_doCorners | ( | ) | [private] |
void casa::AnnRotBox::_init | ( | const Quantity & | xcenter, |
const Quantity & | ycenter, | ||
const Quantity & | xwidth, | ||
const Quantity & | ywidth | ||
) | [private] |
Vector<MDirection> casa::AnnRotBox::getCorners | ( | ) | const |
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.
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
Vector<MDirection> casa::AnnRotBox::_corners [private] |
Definition at line 115 of file AnnRotBox.h.
Definition at line 111 of file AnnRotBox.h.
Vector<Quantity> casa::AnnRotBox::_inputWidths [private] |
Definition at line 112 of file AnnRotBox.h.
Quantity casa::AnnRotBox::_positionAngle [private] |
Definition at line 114 of file AnnRotBox.h.
Vector<Quantity> casa::AnnRotBox::_widths [private] |
Definition at line 113 of file AnnRotBox.h.