casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
casacore::LELRegion Class Reference

Class to hold a region as a LEL node. More...

#include <LELRegion.h>

Inheritance diagram for casacore::LELRegion:
casacore::LELInterface< Bool >

Public Member Functions

 LELRegion (const LattRegionHolder &region)
 Constructor. More...
 
 LELRegion (LattRegionHolder *region)
 Constructor. More...
 
 ~LELRegion ()
 Destructor. More...
 
const LattRegionHolderregion () const
 Get a pointer to the region object. More...
 
virtual void eval (LELArray< Bool > &, const Slicer &) const
 Getting region data cannot be done (throws an exception). More...
 
virtual LELScalar< BoolgetScalar () const
 Getting region data cannot be done (throws an exception). More...
 
virtual Bool prepareScalarExpr ()
 Do further preparations (e.g. More...
 
virtual String className () const
 Get class name. More...
 
- Public Member Functions inherited from casacore::LELInterface< Bool >
virtual ~LELInterface ()
 Virtual destructor. More...
 
virtual void evalRef (LELArrayRef< Bool > &result, const Slicer &section) const
 
LELArray< BoolgetArray () const
 Get the result of an array subexpression. More...
 
Bool isScalar () const
 Is the result of evaluating this expression a scalar ? More...
 
const IPositionshape () const
 Get the shape of the expression result. More...
 
const LELAttributegetAttribute () const
 Get expression attribute. More...
 
virtual Bool lock (FileLocker::LockType, uInt nattempts)
 Handle locking/syncing of the parts of a lattice expression. More...
 
virtual void unlock ()
 
virtual Bool hasLock (FileLocker::LockType) const
 
virtual void resync ()
 

Static Public Member Functions

static LELRegionmakeUnion (const LELInterface< Bool > &left, const LELInterface< Bool > &right)
 Form a compound from the regions. More...
 
static LELRegionmakeIntersection (const LELInterface< Bool > &left, const LELInterface< Bool > &right)
 
static LELRegionmakeDifference (const LELInterface< Bool > &left, const LELInterface< Bool > &right)
 
static LELRegionmakeComplement (const LELInterface< Bool > &expr)
 
- Static Public Member Functions inherited from casacore::LELInterface< Bool >
static Bool replaceScalarExpr (CountedPtr< LELInterface< Bool > > &expr)
 If the given expression is a valid scalar, replace it by its result. More...
 

Static Private Member Functions

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

Private Attributes

LattRegionHolderregion_p
 Member variables. More...
 

Additional Inherited Members

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

Detailed Description

Class to hold a region as a LEL node.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

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 89 of file LELRegion.h.

Constructor & Destructor Documentation

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

Constructor.

casacore::LELRegion::LELRegion ( LattRegionHolder region)

Constructor.

It takes over the pointer.

casacore::LELRegion::~LELRegion ( )

Destructor.

Member Function Documentation

static void casacore::LELRegion::checkTypes ( const LattRegionHolder left,
const LattRegionHolder right 
)
staticprivate

Check if both regions have the same type (pixel or world) and if no LCSlicer type of region is used.

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

Get class name.

Implements casacore::LELInterface< Bool >.

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

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

Implements casacore::LELInterface< Bool >.

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

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

Implements casacore::LELInterface< Bool >.

static LELRegion* casacore::LELRegion::makeComplement ( const LELInterface< Bool > &  expr)
static
static LELRegion* casacore::LELRegion::makeDifference ( const LELInterface< Bool > &  left,
const LELInterface< Bool > &  right 
)
static
static LELRegion* casacore::LELRegion::makeIntersection ( const LELInterface< Bool > &  left,
const LELInterface< Bool > &  right 
)
static
static LELRegion* casacore::LELRegion::makeUnion ( const LELInterface< Bool > &  left,
const LELInterface< Bool > &  right 
)
static

Form a compound from the regions.

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

Do further preparations (e.g.

optimization) on the expression.

Implements casacore::LELInterface< Bool >.

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

Get a pointer to the region object.

Definition at line 102 of file LELRegion.h.

References region_p.

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

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

Member Data Documentation

LattRegionHolder* casacore::LELRegion::region_p
private

Member variables.

Definition at line 138 of file LELRegion.h.

Referenced by region().


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