Loading...
Searching...
No Matches
casacore::LELRegion Class Reference
lattices package (libcasa_lattices) » LEL_module » LEL_module_internal_classes

More...

`#include <LELRegion.h>`

## Public Member Functions

| LELRegion (const LattRegionHolder &region)
| 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.
Public Member Functions inherited from casacore::LELInterface< Bool >
virtual | ~LELInterface ()
| Virtual destructor.
virtual void | evalRef (LELArrayRef< Bool > &result, const Slicer &section) const
LELArray< Bool > | getArray () const
| Get the result of an array subexpression.
Bool | isScalar () const
| Is the result of evaluating this expression a scalar ?
const IPosition & | shape () const
| Get the shape of the expression result.
const LELAttribute & | getAttribute () const
| Get expression attribute.
virtual Bool | lock (FileLocker::LockType, uInt nattempts)
| Handle locking/syncing of the parts of a lattice expression.
virtual void | unlock ()
virtual Bool | hasLock (FileLocker::LockType) const
virtual void | resync ()

## 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 Public Member Functions inherited from casacore::LELInterface< Bool >
static Bool | replaceScalarExpr (std::shared_ptr< LELInterface< Bool > > &expr)
| If the given expression is a valid scalar, replace it by its result.

## Static Private Member Functions

static const LattRegionHolder & | region (const LELInterface< Bool > &expr)
| Get the LattRegionHolder after checking that the expression is a region.
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.

## Additional Inherited Members

Protected Member Functions inherited from casacore::LELInterface< Bool >
void | setAttr (const LELAttribute &attrib)
| Set the expression attributes of this object.

## Detailed Description

Class to hold a region as a LEL node

### Intended use:

Internal

### Review Status

Date Reviewed:
  yyyy/mm/dd

### Prerequisite

- Lattice
- LatticeExpr
- LatticeExprNode
- LELInterface

### Etymology

This derived LEL letter class handles regions.

### Synopsis

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

### Motivation

We needed to be able to handle regions in a LEL expression.

Definition at line 87 of file LELRegion.h.

## Constructor & Destructor Documentation

## LELRegion() [1/2]

casacore::LELRegion::LELRegion | ( | const LattRegionHolder & | region | ) |

Constructor.

References region().

Referenced by makeComplement(), makeDifference(), makeIntersection(), and makeUnion().

## LELRegion() [2/2]

casacore::LELRegion::LELRegion | ( | LattRegionHolder * | region | ) |

Constructor.

It takes over the pointer.

References region().

## ~LELRegion()

casacore::LELRegion::~LELRegion | ( |  | ) |

Destructor.

## Member Function Documentation

## checkTypes()

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

## className()

virtual String casacore::LELRegion::className | ( |  | ) | const

virtual

Get class name.

Implements casacore::LELInterface< Bool >.

## eval()

virtual void casacore::LELRegion::eval | ( | LELArray< Bool > & | ,
|  | const Slicer & | ) const

virtual

Getting region data cannot be done (throws an exception).

Implements casacore::LELInterface< Bool >.

## getScalar()

virtual LELScalar< Bool > casacore::LELRegion::getScalar | ( |  | ) | const

virtual

Getting region data cannot be done (throws an exception).

Implements casacore::LELInterface< Bool >.

## makeComplement()

LELRegion * casacore::LELRegion::makeComplement | ( | const LELInterface< Bool > & | expr | ) |

static

References LELRegion().

## makeDifference()

LELRegion * casacore::LELRegion::makeDifference | ( | const LELInterface< Bool > & | left,
|  | const LELInterface< Bool > & | right )

static

References LELRegion().

## makeIntersection()

LELRegion * casacore::LELRegion::makeIntersection | ( | const LELInterface< Bool > & | left,
|  | const LELInterface< Bool > & | right )

static

References LELRegion().

## makeUnion()

LELRegion * casacore::LELRegion::makeUnion | ( | const LELInterface< Bool > & | left,
|  | const LELInterface< Bool > & | right )

static

Form a compound from the regions.

References LELRegion().

## prepareScalarExpr()

virtual Bool casacore::LELRegion::prepareScalarExpr | ( |  | ) |

virtual

Do further preparations (e.g.

optimization) on the expression.

Implements casacore::LELInterface< Bool >.

## region() [1/2]

const LattRegionHolder & casacore::LELRegion::region | ( |  | ) | const

inline

Get a pointer to the region object.

Definition at line 100 of file LELRegion.h.

References region_p.

Referenced by LELRegion(), and LELRegion().

## region() [2/2]

const LattRegionHolder & casacore::LELRegion::region | ( | const LELInterface< Bool > & | expr | ) |

static private

Get the LattRegionHolder after checking that the expression is a region.

## Member Data Documentation

## region_p

LattRegionHolder* casacore::LELRegion::region_p

private

Member variables.

Definition at line 136 of file LELRegion.h.

Referenced by region().

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

- lattices/LEL/LELRegion.h