casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
casacore::WCEllipsoid Class Reference

Class to define an n-dimensional ellipsoid in world coordinates. More...

#include <WCEllipsoid.h>

Inheritance diagram for casacore::WCEllipsoid:
casacore::WCRegion

Public Member Functions

 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 More...
 
 WCEllipsoid (const Vector< Quantity > &center, const Quantity &radius, const IPosition &pixelAxes, const CoordinateSystem &cSys, const RegionType::AbsRelType absRel=RegionType::Abs)
 sphere. More...
 
 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. More...
 
 WCEllipsoid (const WCEllipsoid &that)
 
WCEllipsoidoperator= (const WCEllipsoid &that)
 
Bool operator== (const WCRegion &other) const
 Comparison. More...
 
WCRegioncloneRegion () const
 Clone a WCRegion object. More...
 
Bool canExtend () const
 Can the region extend itself? By default it cannot. More...
 
String type () const
 Return region type. More...
 
TableRecord toRecord (const String &tableName) const
 Convert the (derived) object to a record. More...
 
LCRegiondoToLCRegion (const CoordinateSystem &csys, const IPosition &latticeShape, const IPosition &pixelAxesMap, const IPosition &outOrder) const
 Convert to an LCRegion using the given coordinate system and shape. More...
 
- Public Member Functions inherited from casacore::WCRegion
 WCRegion ()
 
 WCRegion (const WCRegion &other)
 Copy constructor (copy semantics). More...
 
virtual ~WCRegion ()
 Destructor. More...
 
Bool operator!= (const WCRegion &other) const
 
virtual uInt ndim () const
 Get the dimensionality (i.e. More...
 
const RecordgetAxesDesc () const
 Get the description of all axes. More...
 
const RecordgetAxisDesc (uInt axis) const
 Get the description of the given axis. More...
 
Int axisNr (const Record &desc, const Record &axesDesc) const
 Return the axis number of the description of an axis in the full axes description. More...
 
Bool isAxisDescEqual (const Record &desc1, const Record &desc2) const
 Are both axis descriptions equal? More...
 
const Stringcomment () const
 Get or set the comment. More...
 
void setComment (const String &comment)
 
virtual LCRegiontoLCRegion (const CoordinateSystem &cSys, const IPosition &shape) const
 Convert to an LCRegion using the given new coordinate system and shape. More...
 
LCRegiontoLCRegionAxes (const CoordinateSystem &cSys, const IPosition &shape, const IPosition &pixelAxesMap, const IPosition &outOrder) const
 Convert to an LCRegion using the given coordinate system and shape. More...
 
void defineRecordFields (RecordInterface &record, const String &className) const
 Define the type and class name in the record. More...
 

Static Public Member Functions

static String className ()
 
static WCEllipsoidfromRecord (const TableRecord &rec, const String &)
 
- Static Public Member Functions inherited from casacore::WCRegion
static WCRegionfromRecord (const TableRecord &rec, const String &tableName)
 Convert correct object from a record. More...
 

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
 

Additional Inherited Members

- Protected Member Functions inherited from casacore::WCRegion
WCRegionoperator= (const WCRegion &other)
 Assignment (copy semantics) makes only sense for a derived class. More...
 
void addAxisDesc (const Record &axisDesc)
 Add an axis with its description. More...
 
Record makeAxisDesc (const CoordinateSystem &cSys, uInt pixelAxis) const
 Make a description of a pixel axis in the coordinate system. More...
 
Record makeAxesDesc (const CoordinateSystem &cSys) const
 Make a description of all pixel axes in the coordinate system (in pixel axes order). More...
 
void makeWorldAbsolute (Vector< Double > &world, const Vector< Int > &absRel, const CoordinateSystem &cSys, const IPosition &shape) const
 Convert relative to absolute world as needed. More...
 
void checkAxes (const IPosition &pixelAxes, const CoordinateSystem &cSys, const Vector< String > &quantityUnits) const
 
- Static Protected Member Functions inherited from casacore::WCRegion
static void unitInit ()
 
static void convertPixel (Double &pixel, const Double &value, const String &unit, const Int absRel, const Double refPix, const Int shape)
 

Detailed Description

Class to define an n-dimensional ellipsoid in world coordinates.

Intended use:

Public interface

Prerequisite

Synopsis

Motivation

Users must be able to specify ellipsoids in world as well as lattice coordinates.

Definition at line 71 of file WCEllipsoid.h.

Member Enumeration Documentation

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.

Enumerator
NOT_SPECIAL 
SPHERE 
ELLIPSE_2D 

Definition at line 140 of file WCEllipsoid.h.

Constructor & Destructor Documentation

casacore::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

casacore::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.

casacore::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.

casacore::WCEllipsoid::WCEllipsoid ( const WCEllipsoid that)
casacore::WCEllipsoid::WCEllipsoid ( )
private

Member Function Documentation

void casacore::WCEllipsoid::_checkPixelAxes ( ) const
private
void casacore::WCEllipsoid::_checkUnits ( ) const
private
void casacore::WCEllipsoid::_init ( )
private
Bool casacore::WCEllipsoid::canExtend ( ) const
virtual

Can the region extend itself? By default it cannot.

Reimplemented from casacore::WCRegion.

static String casacore::WCEllipsoid::className ( )
static
WCRegion* casacore::WCEllipsoid::cloneRegion ( ) const
virtual

Clone a WCRegion object.

Implements casacore::WCRegion.

LCRegion* casacore::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 casacore::WCRegion.

static WCEllipsoid* casacore::WCEllipsoid::fromRecord ( const TableRecord rec,
const String  
)
static
WCEllipsoid& casacore::WCEllipsoid::operator= ( const WCEllipsoid that)
Bool casacore::WCEllipsoid::operator== ( const WCRegion other) const
virtual

Comparison.

Reimplemented from casacore::WCRegion.

TableRecord casacore::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 casacore::WCRegion.

String casacore::WCEllipsoid::type ( ) const
virtual

Return region type.

Just returns the class name of the derived class.

Implements casacore::WCRegion.

Member Data Documentation

RegionType::AbsRelType casacore::WCEllipsoid::_absRel
private

Definition at line 153 of file WCEllipsoid.h.

Vector<Quantity> casacore::WCEllipsoid::_center
private

Definition at line 148 of file WCEllipsoid.h.

CoordinateSystem casacore::WCEllipsoid::_csys
private

Definition at line 152 of file WCEllipsoid.h.

IPosition casacore::WCEllipsoid::_pixelAxes
private

Definition at line 151 of file WCEllipsoid.h.

Vector<Quantity> casacore::WCEllipsoid::_radii
private

Definition at line 149 of file WCEllipsoid.h.

SpecialType casacore::WCEllipsoid::_specType
private

Definition at line 155 of file WCEllipsoid.h.

Quantity casacore::WCEllipsoid::_theta
private

Definition at line 154 of file WCEllipsoid.h.


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