LCEllipsoid.h

Classes

LCEllipsoid -- Define an N-dimensional ellipsoidal region of interest. (full description)

class LCEllipsoid: public LCRegionFixed

Interface

Public Members
LCEllipsoid()
LCEllipsoid (const IPosition& center, Float radius, const IPosition& latticeShape)
LCEllipsoid (const Vector<Float>& center, Float radius, const IPosition& latticeShape)
LCEllipsoid (const Vector<Double>& center, Double radius, const IPosition& latticeShape)
LCEllipsoid (const Vector<Float>& center, const Vector<Float>& radii, const IPosition& latticeShape)
LCEllipsoid (const Vector<Double>& center, const Vector<Double>& radii, const IPosition& latticeShape)
LCEllipsoid (const LCEllipsoid& other)
virtual ~LCEllipsoid()
LCEllipsoid& operator= (const LCEllipsoid& other)
virtual Bool operator== (const LCRegion& other) const
virtual LCRegion* cloneRegion() const
const Vector<Float>& center() const
const Vector<Float>& radii() const
static String className()
virtual String type() const
virtual TableRecord toRecord (const String& tableName) const
static LCEllipsoid* fromRecord (const TableRecord&, const String& tableName)
Protected Members
virtual LCRegion* doTranslate (const Vector<Float>& translateVector, const IPosition& newLatticeShape) const
Private Members
void fillCenter (const IPosition& center)
static Slicer makeBox (const Vector<Float>& center, const Vector<Float>& radii, const IPosition& latticeShape)
void defineMask()

Description

Prerequisite

Synopsis

The LCEllipsoid class is a specialization of class LCRegion. It makes it possible to define an N-dimensional ellipsoidal region of interest, which includes the border. A separate constructor exists to define the special case of an N-dimensional sphere.
The center and the radii of the ellipsoid do not need to be pixel aligned. The center of the ellipsoid must be inside the lattice. The current implementation only supports ellipsoids with axes parallel to the lattice axes.

It can only be used for a lattice of any dimensionality as long as the dimensionality of the (hyper-)ellipsoid matches the dimensionality of the lattice.

Example


 

To Do

Member Description

LCEllipsoid()

LCEllipsoid (const IPosition& center, Float radius, const IPosition& latticeShape)

Construct an N-dimensional sphere with the given center and radius (in pixels). The center is pixel-aligned.

LCEllipsoid (const Vector<Float>& center, Float radius, const IPosition& latticeShape)
LCEllipsoid (const Vector<Double>& center, Double radius, const IPosition& latticeShape)

Construct an N-dimensional sphere with the given center and radius (in pixels). The center does not need to be pixel-aligned.

LCEllipsoid (const Vector<Float>& center, const Vector<Float>& radii, const IPosition& latticeShape)
LCEllipsoid (const Vector<Double>& center, const Vector<Double>& radii, const IPosition& latticeShape)

Construct an N-dimensional ellipsoid with the given center and radii (in pixels). The center does not need to be pixel-aligned. (the radii are half the length of the axes of the ellipsoid).

LCEllipsoid (const LCEllipsoid& other)

Copy constructor (reference semantics).

virtual ~LCEllipsoid()

LCEllipsoid& operator= (const LCEllipsoid& other)

Assignment (copy semantics).

virtual Bool operator== (const LCRegion& other) const

Comparison

virtual LCRegion* cloneRegion() const

Make a copy of the derived object.

const Vector<Float>& center() const

Get the center.

const Vector<Float>& radii() const

Get the radii.

static String className()

Get the class name (to store in the record).

virtual String type() const

Get the region type. Returns className()

virtual TableRecord toRecord (const String& tableName) const

Convert the (derived) object to a record.

static LCEllipsoid* fromRecord (const TableRecord&, const String& tableName)

Convert correct object from a record.

virtual LCRegion* doTranslate (const Vector<Float>& translateVector, const IPosition& newLatticeShape) const

Construct another LCBox (for e.g. another lattice) by moving this one. It recalculates the bounding box. A positive translation value indicates "to right".

void fillCenter (const IPosition& center)

Fill the itsCenter vector from an IPosition.

static Slicer makeBox (const Vector<Float>& center, const Vector<Float>& radii, const IPosition& latticeShape)

Make the bounding box from center, radii, and shape.

void defineMask()

Define the mask to indicate which elements are inside the ellipsoid.