casa
$Rev:20696$
|
Class to define a mask as a LEL expression. More...
#include <LCLELMask.h>
Public Member Functions | |
LCLELMask () | |
LCLELMask (const LatticeExpr< Bool > &expr) | |
Construct from vectors of world coordinates defining the box corners. | |
LCLELMask (const LCLELMask &other) | |
Copy constructor (copy semantics). | |
virtual | ~LCLELMask () |
Destructor. | |
LCLELMask & | operator= (const LCLELMask &other) |
Assignment (copy semantics) | |
virtual Bool | operator== (const LCRegion &other) const |
Comparison. | |
virtual LCRegion * | cloneRegion () const |
Clone a LCLELMask object. | |
virtual Bool | lock (FileLocker::LockType, uInt nattempts) |
Handle the (un)locking. | |
virtual void | unlock () |
virtual Bool | hasLock (FileLocker::LockType) const |
virtual void | resync () |
Resynchronize the PagedArray object with the lattice file. | |
virtual void | tempClose () |
Temporarily close the lattice. | |
virtual void | reopen () |
Explicitly reopen the temporarily closed lattice. | |
virtual String | type () const |
Return region type. | |
virtual TableRecord | toRecord (const String &tableName) const |
Convert the LCLELMask object to a record. | |
Static Public Member Functions | |
static String | className () |
Returns LCLELMask. | |
Protected Member Functions | |
virtual LCRegion * | doTranslate (const Vector< Float > &translateVector, const IPosition &newLatticeShape) const |
Translating an LCLELMask is not possible, so it throws an exception. | |
Private Attributes | |
LCBox | itsBox |
LatticeExpr< Bool > | itsExpr |
Class to define a mask as a LEL expression.
Public interface
The LCLELMask class is a specialization of class LCRegion .
It can be used to define an on-the-fly mask for a lattice using a boolean LatticeExpr . The contents of the mask are calculated on the fly from the expression. Thus the mask may change if the data in the lattice(s) used in the expression change.
Caution: This mask is not persistent, thus it cannot be saved with an image; Use class WCLELMask to have a persistent on-the-fly mask; It means that normally a WCLELMask should be used (which gets converted to an LCLELMask when applied to an image);
LCLELMask is needed to make
Definition at line 87 of file LCLELMask.h.
casa::LCLELMask::LCLELMask | ( | const LatticeExpr< Bool > & | expr | ) | [explicit] |
Construct from vectors of world coordinates defining the box corners.
It is assumed that the order of the values is in the order of the pixel axes.
casa::LCLELMask::LCLELMask | ( | const LCLELMask & | other | ) |
Copy constructor (copy semantics).
virtual casa::LCLELMask::~LCLELMask | ( | ) | [virtual] |
Destructor.
static String casa::LCLELMask::className | ( | ) | [static] |
Returns LCLELMask.
virtual LCRegion* casa::LCLELMask::cloneRegion | ( | ) | const [virtual] |
Clone a LCLELMask object.
Implements casa::LCRegion.
virtual LCRegion* casa::LCLELMask::doTranslate | ( | const Vector< Float > & | translateVector, |
const IPosition & | newLatticeShape | ||
) | const [protected, virtual] |
Translating an LCLELMask is not possible, so it throws an exception.
Implements casa::LCRegion.
virtual Bool casa::LCLELMask::hasLock | ( | FileLocker::LockType | ) | const [virtual] |
Reimplemented from casa::LatticeBase.
virtual Bool casa::LCLELMask::lock | ( | FileLocker::LockType | , |
uInt | nattempts | ||
) | [virtual] |
Handle the (un)locking.
Reimplemented from casa::LatticeBase.
Comparison.
Reimplemented from casa::LCRegion.
virtual void casa::LCLELMask::reopen | ( | ) | [virtual] |
Explicitly reopen the temporarily closed lattice.
Reimplemented from casa::LatticeBase.
virtual void casa::LCLELMask::resync | ( | ) | [virtual] |
Resynchronize the PagedArray object with the lattice file.
This function is only useful if no read-locking is used, ie. if the table lock option is UserNoReadLocking or AutoNoReadLocking. In that cases the table system does not acquire a read-lock, thus does not synchronize itself automatically.
Reimplemented from casa::LatticeBase.
virtual void casa::LCLELMask::tempClose | ( | ) | [virtual] |
Temporarily close the lattice.
It will be reopened automatically on the next access.
Reimplemented from casa::LatticeBase.
virtual TableRecord casa::LCLELMask::toRecord | ( | const String & | tableName | ) | const [virtual] |
Convert the LCLELMask object to a record.
This cannot be done as a Lattice expression cannot be made persistent (only Image expressions can, thus only WCLELMask is persistent).
So this function throws an exception.
Implements casa::LCRegion.
virtual String casa::LCLELMask::type | ( | ) | const [virtual] |
virtual void casa::LCLELMask::unlock | ( | ) | [virtual] |
Reimplemented from casa::LatticeBase.
LCBox casa::LCLELMask::itsBox [private] |
Definition at line 152 of file LCLELMask.h.
LatticeExpr<Bool> casa::LCLELMask::itsExpr [private] |
Definition at line 153 of file LCLELMask.h.