casa
$Rev:20696$
|
Class to define an n-dimensional ellipsoid in world coordinates. More...
#include <WCEllipsoid.h>
Public Member Functions | |
WCEllipsoid (const Vector< Quantity > ¢er, const Vector< Quantity > &radii, const IPosition &pixelAxes, const CoordinateSystem &cSys, const RegionType::AbsRelType absRel=RegionType::Abs) | |
ellipsoid with axes parallel to coordinate axes | |
WCEllipsoid (const Vector< Quantity > ¢er, const Quantity &radius, const IPosition &pixelAxes, const CoordinateSystem &cSys, const RegionType::AbsRelType absRel=RegionType::Abs) | |
sphere. | |
WCEllipsoid (const Quantity &xcenter, const Quantity &ycenter, const Quantity &majorAxis, const Quantity &minorAxis, const Quantity &theta, const uInt pixelAxis0, const uInt pixelAxis1, const CoordinateSystem &cSys, const RegionType::AbsRelType absRel=RegionType::Abs) | |
2-D ellipse . | |
WCEllipsoid (const WCEllipsoid &that) | |
WCEllipsoid & | operator= (const WCEllipsoid &that) |
Bool | operator== (const WCRegion &other) const |
Comparison. | |
WCRegion * | cloneRegion () const |
Clone a WCRegion object. | |
Bool | canExtend () const |
Can the region extend itself? By default it cannot. | |
String | type () const |
Return region type. | |
TableRecord | toRecord (const String &tableName) const |
Convert the (derived) object to a record. | |
LCRegion * | doToLCRegion (const CoordinateSystem &csys, const IPosition &latticeShape, const IPosition &pixelAxesMap, const IPosition &outOrder) const |
Convert to an LCRegion using the given coordinate system and shape. | |
Static Public Member Functions | |
static String | className () |
static WCEllipsoid * | fromRecord (const TableRecord &rec, const String &) |
Convert correct object from a record. | |
Private Types | |
enum | SpecialType { NOT_SPECIAL, SPHERE, ELLIPSE_2D } |
WARN do not change the order of the members of this enum or you will break backward compatibility with records previously saved persistently. More... | |
Private Member Functions | |
WCEllipsoid () | |
void | _checkPixelAxes () const |
void | _checkUnits () const |
void | _init () |
Private Attributes | |
Vector< Quantity > | _center |
Vector< Quantity > | _radii |
IPosition | _pixelAxes |
CoordinateSystem | _csys |
RegionType::AbsRelType | _absRel |
Quantity | _theta |
SpecialType | _specType |
Class to define an n-dimensional ellipsoid in world coordinates.
Public interface
Users must be able to specify ellipsoids in world as well as lattice coordinates.
Definition at line 71 of file WCEllipsoid.h.
enum casa::WCEllipsoid::SpecialType [private] |
WARN do not change the order of the members of this enum or you will break backward compatibility with records previously saved persistently.
Add new types to the end of the enum.
Definition at line 140 of file WCEllipsoid.h.
casa::WCEllipsoid::WCEllipsoid | ( | const Vector< Quantity > & | center, |
const Vector< Quantity > & | radii, | ||
const IPosition & | pixelAxes, | ||
const CoordinateSystem & | cSys, | ||
const RegionType::AbsRelType | absRel = RegionType::Abs |
||
) |
ellipsoid with axes parallel to coordinate axes
casa::WCEllipsoid::WCEllipsoid | ( | const Vector< Quantity > & | center, |
const Quantity & | radius, | ||
const IPosition & | pixelAxes, | ||
const CoordinateSystem & | cSys, | ||
const RegionType::AbsRelType | absRel = RegionType::Abs |
||
) |
sphere.
pixelAxes
must have the same base units and those pixels musb be square or an exception is thrown.
casa::WCEllipsoid::WCEllipsoid | ( | const Quantity & | xcenter, |
const Quantity & | ycenter, | ||
const Quantity & | majorAxis, | ||
const Quantity & | minorAxis, | ||
const Quantity & | theta, | ||
const uInt | pixelAxis0, | ||
const uInt | pixelAxis1, | ||
const CoordinateSystem & | cSys, | ||
const RegionType::AbsRelType | absRel = RegionType::Abs |
||
) |
2-D ellipse .
The axes must have the same base units and those pixels must be square or an exception is thrown. theta
is the angle between the pixelAxis0
and the major axis of the ellipse.
casa::WCEllipsoid::WCEllipsoid | ( | const WCEllipsoid & | that | ) |
casa::WCEllipsoid::WCEllipsoid | ( | ) | [private] |
void casa::WCEllipsoid::_checkPixelAxes | ( | ) | const [private] |
void casa::WCEllipsoid::_checkUnits | ( | ) | const [private] |
void casa::WCEllipsoid::_init | ( | ) | [private] |
Bool casa::WCEllipsoid::canExtend | ( | ) | const [virtual] |
Can the region extend itself? By default it cannot.
Reimplemented from casa::WCRegion.
static String casa::WCEllipsoid::className | ( | ) | [static] |
WCRegion* casa::WCEllipsoid::cloneRegion | ( | ) | const [virtual] |
Clone a WCRegion object.
Implements casa::WCRegion.
LCRegion* casa::WCEllipsoid::doToLCRegion | ( | const CoordinateSystem & | cSys, |
const IPosition & | shape, | ||
const IPosition & | pixelAxesMap, | ||
const IPosition & | extendAxes | ||
) | const [virtual] |
Convert to an LCRegion using the given coordinate system and shape.
pixelAxesMap(i) is the axis in cSys and shape for region axis i.
outOrder(i) is the axis in the output LCRegion for region axis i.
They always have the same length. If the region can extend itself, the length of pixelAxesMap and outOrder can be more than the dimensionality of the region. The latter axes in them are the extension axes.
Implements casa::WCRegion.
static WCEllipsoid* casa::WCEllipsoid::fromRecord | ( | const TableRecord & | rec, |
const String & | tableName | ||
) | [static] |
Convert correct object from a record.
Reimplemented from casa::WCRegion.
WCEllipsoid& casa::WCEllipsoid::operator= | ( | const WCEllipsoid & | that | ) |
Comparison.
Reimplemented from casa::WCRegion.
TableRecord casa::WCEllipsoid::toRecord | ( | const String & | tableName | ) | const [virtual] |
Convert the (derived) object to a record.
The record can be used to make the object persistent. The tableName
argument can be used by derived classes (e.g. LCPagedMask) to put very large objects.
Implements casa::WCRegion.
String casa::WCEllipsoid::type | ( | ) | const [virtual] |
Definition at line 153 of file WCEllipsoid.h.
Vector<Quantity> casa::WCEllipsoid::_center [private] |
Definition at line 148 of file WCEllipsoid.h.
CoordinateSystem casa::WCEllipsoid::_csys [private] |
Definition at line 152 of file WCEllipsoid.h.
IPosition casa::WCEllipsoid::_pixelAxes [private] |
Definition at line 151 of file WCEllipsoid.h.
Vector<Quantity> casa::WCEllipsoid::_radii [private] |
Definition at line 149 of file WCEllipsoid.h.
SpecialType casa::WCEllipsoid::_specType [private] |
Definition at line 155 of file WCEllipsoid.h.
Quantity casa::WCEllipsoid::_theta [private] |
Definition at line 154 of file WCEllipsoid.h.