28 #ifndef LATTICES_LCELLIPSOID_H
29 #define LATTICES_LCELLIPSOID_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/lattices/LRegions/LCRegionFixed.h>
34 #include <casacore/casa/Arrays/Vector.h>
static LCEllipsoid * fromRecord(const TableRecord &, const String &tableName)
Convert correct object from a record.
Vector< Float > itsCenter
void _doOutside()
set the mask in the case the center lies outside the lattice
LCEllipsoid(const Vector< Float > ¢er, const Vector< Float > &radii, const IPosition &latticeShape)
Construct an N-dimensional ellipsoid with the given center and radii (in pixels).
const Vector< Float > & center() const
Get the center.
virtual TableRecord toRecord(const String &tableName) const
Convert the (derived) object to a record.
void defineMask()
Define the mask to indicate which elements are inside the ellipsoid.
void _defineMask2D()
for 2-D ellipse with non-zero theta.
LCEllipsoid & operator=(const LCEllipsoid &other)
Assignment (copy semantics).
const Vector< Float > & radii() const
Get the radii.
virtual String type() const
Get the region type.
virtual Bool operator==(const LCRegion &other) const
Comparison.
LCEllipsoid(const Float xcenter, const Float ycenter, const Float majorAxis, const Float minorAxis, const Float theta, const IPosition &latticeShape)
Construct a two dimensional ellipse with theta being the angle from the x-axis to the major axis of t...
LCEllipsoid(const LCEllipsoid &other)
Copy constructor (reference semantics).
Slicer makeBox(const Vector< Float > &radii, const IPosition &latticeShape)
Make the bounding box from center, radii, and shape.
LCEllipsoid(const IPosition ¢er, Float radius, const IPosition &latticeShape)
Construct an N-dimensional sphere with the given center and radius (in pixels).
LCEllipsoid(const Vector< Double > ¢er, const Vector< Double > &radii, const IPosition &latticeShape)
Bool _centerIsInside
is center inside the lattice?
const Float & theta() const
Get the angle of the major axis of the ellipse relative to the x-axis 2-D only, throws exception if e...
void fillCenter(const IPosition ¢er)
Fill the itsCenter vector from an IPosition.
Vector< Float > _epsilon
small offset to guard against roundoff error
LCEllipsoid(const Vector< Float > ¢er, Float radius, const IPosition &latticeShape)
Construct an N-dimensional sphere with the given center and radius (in pixels).
Float _theta
for 2-D case only
virtual LCRegion * cloneRegion() const
Make a copy of the derived object.
LCEllipsoid(const Vector< Double > ¢er, Double radius, const IPosition &latticeShape)
static String className()
Get the class name (to store in the record).
virtual LCRegion * doTranslate(const Vector< Float > &translateVector, const IPosition &newLatticeShape) const
Construct another LCBox (for e.g.
const IPosition & latticeShape() const
Give the full lattice shape.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.