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 88 of file LCLELMask.h.
casacore::LCLELMask::LCLELMask | ( | ) |
casacore::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.
casacore::LCLELMask::LCLELMask | ( | const LCLELMask & | other | ) |
Copy constructor (copy semantics).
virtual casacore::LCLELMask::~LCLELMask | ( | ) | [virtual] |
Destructor.
virtual LCRegion* casacore::LCLELMask::cloneRegion | ( | ) | const [virtual] |
Clone a LCLELMask object.
Implements casacore::LCRegion.
virtual LCRegion* casacore::LCLELMask::doTranslate | ( | const Vector< Float > & | translateVector, | |
const IPosition & | newLatticeShape | |||
) | const [protected, virtual] |
Translating an LCLELMask is not possible, so it throws an exception.
Implements casacore::LCRegion.
virtual Bool casacore::LCLELMask::hasLock | ( | FileLocker::LockType | ) | const [virtual] |
Reimplemented from casacore::LatticeBase.
virtual Bool casacore::LCLELMask::lock | ( | FileLocker::LockType | , | |
uInt | nattempts | |||
) | [virtual] |
Handle the (un)locking.
Reimplemented from casacore::LatticeBase.
Assignment (copy semantics).
Reimplemented from casacore::LCRegionSingle.
virtual void casacore::LCLELMask::reopen | ( | ) | [virtual] |
Explicitly reopen the temporarily closed lattice.
Reimplemented from casacore::LatticeBase.
virtual void casacore::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 casacore::LatticeBase.
virtual void casacore::LCLELMask::tempClose | ( | ) | [virtual] |
Temporarily close the lattice.
It will be reopened automatically on the next access.
Reimplemented from casacore::LatticeBase.
virtual TableRecord casacore::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 casacore::LCRegion.
virtual String casacore::LCLELMask::type | ( | ) | const [virtual] |
virtual void casacore::LCLELMask::unlock | ( | ) | [virtual] |
Reimplemented from casacore::LatticeBase.
LCBox casacore::LCLELMask::itsBox [private] |
Definition at line 153 of file LCLELMask.h.
LatticeExpr<Bool> casacore::LCLELMask::itsExpr [private] |
Definition at line 154 of file LCLELMask.h.