casa
$Rev:20696$
|
Class to hold a region as a LEL node. More...
#include <LELRegion.h>
Public Member Functions | |
LELRegion (const LattRegionHolder ®ion) | |
Constructor. | |
LELRegion (LattRegionHolder *region) | |
Constructor. | |
~LELRegion () | |
Destructor. | |
const LattRegionHolder & | region () const |
Get a pointer to the region object. | |
virtual void | eval (LELArray< Bool > &, const Slicer &) const |
Getting region data cannot be done (throws an exception). | |
virtual LELScalar< Bool > | getScalar () const |
Getting region data cannot be done (throws an exception). | |
virtual Bool | prepareScalarExpr () |
Do further preparations (e.g. | |
virtual String | className () const |
Get class name. | |
Static Public Member Functions | |
static LELRegion * | makeUnion (const LELInterface< Bool > &left, const LELInterface< Bool > &right) |
Form a compound from the regions. | |
static LELRegion * | makeIntersection (const LELInterface< Bool > &left, const LELInterface< Bool > &right) |
static LELRegion * | makeDifference (const LELInterface< Bool > &left, const LELInterface< Bool > &right) |
static LELRegion * | makeComplement (const LELInterface< Bool > &expr) |
Static Private Member Functions | |
static const LattRegionHolder & | region (const LELInterface< Bool > &expr) |
static void | checkTypes (const LattRegionHolder &left, const LattRegionHolder &right) |
Check if both regions have the same type (pixel or world) and if no LCSlicer type of region is used. | |
Private Attributes | |
LattRegionHolder * | region_p |
Member variables. |
Class to hold a region as a LEL node.
Internal
This derived LEL letter class handles regions.
This LEL letter class is derived from LELInterface. It is used to construct LEL objects from regions. The internal region is an ImageRegion object, thus the region can be of any type. With operator [] a region is applied to an image (expression). At that stage possible world coordinates are converted to lattice coordinates.
The attributes of a LELRegion object define an empty shape, because in general the shape of a region is only known after it is applied to an image.
A description of the implementation details of the LEL classes can be found in Note 216
We needed to be able to handle regions in a LEL expression.
Definition at line 88 of file LELRegion.h.
casa::LELRegion::LELRegion | ( | const LattRegionHolder & | region | ) |
Constructor.
casa::LELRegion::LELRegion | ( | LattRegionHolder * | region | ) |
Constructor.
It takes over the pointer.
Destructor.
static void casa::LELRegion::checkTypes | ( | const LattRegionHolder & | left, |
const LattRegionHolder & | right | ||
) | [static, private] |
Check if both regions have the same type (pixel or world) and if no LCSlicer type of region is used.
virtual String casa::LELRegion::className | ( | ) | const [virtual] |
Get class name.
Implements casa::LELInterface< Bool >.
virtual void casa::LELRegion::eval | ( | LELArray< Bool > & | , |
const Slicer & | |||
) | const [virtual] |
Getting region data cannot be done (throws an exception).
Implements casa::LELInterface< Bool >.
virtual LELScalar<Bool> casa::LELRegion::getScalar | ( | ) | const [virtual] |
Getting region data cannot be done (throws an exception).
Implements casa::LELInterface< Bool >.
static LELRegion* casa::LELRegion::makeComplement | ( | const LELInterface< Bool > & | expr | ) | [static] |
static LELRegion* casa::LELRegion::makeDifference | ( | const LELInterface< Bool > & | left, |
const LELInterface< Bool > & | right | ||
) | [static] |
static LELRegion* casa::LELRegion::makeIntersection | ( | const LELInterface< Bool > & | left, |
const LELInterface< Bool > & | right | ||
) | [static] |
static LELRegion* casa::LELRegion::makeUnion | ( | const LELInterface< Bool > & | left, |
const LELInterface< Bool > & | right | ||
) | [static] |
Form a compound from the regions.
virtual Bool casa::LELRegion::prepareScalarExpr | ( | ) | [virtual] |
Do further preparations (e.g.
optimization) on the expression.
Implements casa::LELInterface< Bool >.
const LattRegionHolder& casa::LELRegion::region | ( | ) | const [inline] |
Get a pointer to the region object.
Definition at line 101 of file LELRegion.h.
References region_p.
static const LattRegionHolder& casa::LELRegion::region | ( | const LELInterface< Bool > & | expr | ) | [static, private] |
Get the LattRegionHolder after checking that the expression is a region.
LattRegionHolder* casa::LELRegion::region_p [private] |