This class represents a single polygon (in position coordinates) annotation specified in an ascii region file as proposed in CAS-2285 <author>Dave Mehringer</author>. More...
#include <AnnPolygon.h>
Public Member Functions | |
AnnPolygon (const Vector< Quantity > &xPositions, const Vector< Quantity > &yPositions, 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) | |
AnnPolygon (const Vector< Quantity > &xPositions, const Vector< Quantity > &yPositions, const CoordinateSystem &csys, const IPosition &imShape, const Vector< Stokes::StokesTypes > &stokes) | |
Simplified constructor. | |
AnnPolygon & | operator= (const AnnPolygon &other) |
implicit copy constructor and destructor are fine | |
Vector< MDirection > | getCorners () const |
get the vertices converted to the coordinate system used at construction. | |
void | worldVertices (vector< Quantity > &x, vector< Quantity > &y) const |
get the world coordinates of the polygon vertices | |
void | pixelVertices (vector< Double > &x, vector< Double > &y) const |
get the pixel coordinates of the polygon vertices | |
virtual ostream & | print (ostream &os) const |
Protected Member Functions | |
AnnPolygon (AnnotationBase::Type shape, const Quantity &blcx, const Quantity &blcy, const Quantity &trcx, const Quantity &trcy, 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) | |
for rectangle subclasses | |
AnnPolygon (AnnotationBase::Type shape, const Quantity &blcx, const Quantity &blcy, const Quantity &trcx, const Quantity &trcy, const CoordinateSystem &csys, const IPosition &imShape, const Vector< Stokes::StokesTypes > &stokes) | |
Simplified constructor. | |
AnnPolygon (AnnotationBase::Type shape, const Quantity ¢erx, const Quantity ¢ery, const Quantity &widthx, const Quantity &widthy, 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) | |
For centered rectangles. | |
AnnPolygon (AnnotationBase::Type shape, const Quantity ¢erx, const Quantity ¢ery, const Quantity &widthx, const Quantity &widthy, const Quantity &positionAngle, const CoordinateSystem &csys, const IPosition &imShape, const Vector< Stokes::StokesTypes > &stokes) | |
Simplified constructor. | |
Private Member Functions | |
void | _init () |
void | _initCorners (const Quantity &blcx, const Quantity &blcy, const Quantity &trcx, const Quantity &trcy) |
void | _initCorners (const MDirection &blc, const MDirection &corner2, const MDirection &trc, const MDirection &corner4) |
void | _initCenterRectCorners (const Quantity ¢erx, const Quantity ¢ery, const Quantity &widthx, const Quantity &widthy, const Quantity &positionAngle) |
void | _doCorners (const Quantity &widthx, const Quantity widthy) |
Private Attributes | |
Vector< Quantity > | _origXPos |
Vector< Quantity > | _origYPos |
This class represents a single polygon (in position coordinates) annotation specified in an ascii region file as proposed in CAS-2285 <author>Dave Mehringer</author>.
Public interface
Holds the specification of a polygon annotation.
This class represents a polygon annotation.
Definition at line 46 of file AnnPolygon.h.
casa::AnnPolygon::AnnPolygon | ( | const Vector< Quantity > & | xPositions, | |
const Vector< Quantity > & | yPositions, | |||
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 | |||
) |
casa::AnnPolygon::AnnPolygon | ( | const Vector< Quantity > & | xPositions, | |
const Vector< Quantity > & | yPositions, | |||
const CoordinateSystem & | csys, | |||
const IPosition & | imShape, | |||
const Vector< Stokes::StokesTypes > & | stokes | |||
) |
Simplified constructor.
all frequencies are used (these can be set after construction). xPositions and yPositions 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.
casa::AnnPolygon::AnnPolygon | ( | AnnotationBase::Type | shape, | |
const Quantity & | blcx, | |||
const Quantity & | blcy, | |||
const Quantity & | trcx, | |||
const Quantity & | trcy, | |||
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 | |||
) | [protected] |
for rectangle subclasses
casa::AnnPolygon::AnnPolygon | ( | AnnotationBase::Type | shape, | |
const Quantity & | blcx, | |||
const Quantity & | blcy, | |||
const Quantity & | trcx, | |||
const Quantity & | trcy, | |||
const CoordinateSystem & | csys, | |||
const IPosition & | imShape, | |||
const Vector< Stokes::StokesTypes > & | stokes | |||
) | [protected] |
Simplified constructor.
all frequencies are used (these can be set after construction). blcx, blcy, trcx, and trcy 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.
casa::AnnPolygon::AnnPolygon | ( | AnnotationBase::Type | shape, | |
const Quantity & | centerx, | |||
const Quantity & | centery, | |||
const Quantity & | widthx, | |||
const Quantity & | widthy, | |||
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 | |||
) | [protected] |
For centered rectangles.
casa::AnnPolygon::AnnPolygon | ( | AnnotationBase::Type | shape, | |
const Quantity & | centerx, | |||
const Quantity & | centery, | |||
const Quantity & | widthx, | |||
const Quantity & | widthy, | |||
const Quantity & | positionAngle, | |||
const CoordinateSystem & | csys, | |||
const IPosition & | imShape, | |||
const Vector< Stokes::StokesTypes > & | stokes | |||
) | [protected] |
Simplified constructor.
all frequencies are used (these can be set after construction). centerx and centery 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::AnnPolygon::_doCorners | ( | const Quantity & | widthx, | |
const Quantity | widthy | |||
) | [private] |
void casa::AnnPolygon::_init | ( | ) | [private] |
Reimplemented from casa::AnnRegion.
void casa::AnnPolygon::_initCenterRectCorners | ( | const Quantity & | centerx, | |
const Quantity & | centery, | |||
const Quantity & | widthx, | |||
const Quantity & | widthy, | |||
const Quantity & | positionAngle | |||
) | [private] |
void casa::AnnPolygon::_initCorners | ( | const MDirection & | blc, | |
const MDirection & | corner2, | |||
const MDirection & | trc, | |||
const MDirection & | corner4 | |||
) | [private] |
void casa::AnnPolygon::_initCorners | ( | const Quantity & | blcx, | |
const Quantity & | blcy, | |||
const Quantity & | trcx, | |||
const Quantity & | trcy | |||
) | [private] |
Vector<MDirection> casa::AnnPolygon::getCorners | ( | ) | const |
get the vertices converted to the coordinate system used at construction.
AnnPolygon& casa::AnnPolygon::operator= | ( | const AnnPolygon & | other | ) |
implicit copy constructor and destructor are fine
Reimplemented from casa::AnnRegion.
Reimplemented in casa::AnnCenterBox, casa::AnnRectBox, and casa::AnnRotBox.
void casa::AnnPolygon::pixelVertices | ( | vector< Double > & | x, | |
vector< Double > & | y | |||
) | const |
get the pixel coordinates of the polygon vertices
virtual ostream& casa::AnnPolygon::print | ( | ostream & | os | ) | const [virtual] |
Implements casa::AnnotationBase.
Reimplemented in casa::AnnCenterBox, casa::AnnRectBox, and casa::AnnRotBox.
void casa::AnnPolygon::worldVertices | ( | vector< Quantity > & | x, | |
vector< Quantity > & | y | |||
) | const |
get the world coordinates of the polygon vertices
Vector<Quantity> casa::AnnPolygon::_origXPos [private] |
Definition at line 171 of file AnnPolygon.h.
Vector<Quantity> casa::AnnPolygon::_origYPos [private] |
Definition at line 171 of file AnnPolygon.h.