LCLELMask.h
Classes
- LCLELMask -- Class to define a mask as a LEL expression (full description)
Interface
- Public Members
- LCLELMask()
- explicit LCLELMask (const LatticeExpr<Bool>& expr)
- LCLELMask (const LCLELMask& other)
- virtual ~LCLELMask()
- LCLELMask& operator= (const LCLELMask& other)
- virtual Bool operator== (const LCRegion& other) const
- virtual LCRegion* cloneRegion() const
- virtual Bool lock (FileLocker::LockType, uInt nattempts)
- virtual void unlock()
- virtual Bool hasLock (FileLocker::LockType) const
- virtual void resync()
- virtual void tempClose()
- virtual void reopen()
- static String className()
- virtual String type() const
- virtual TableRecord toRecord (const String& tableName) const
- Protected Members
- virtual LCRegion* doTranslate (const Vector<Float>& translateVector, const IPosition& newLatticeShape) const
Prerequisite
Synopsis
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.
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).
Example
Motivation
LCLELMask is needed to make
Member Description
explicit LCLELMask (const LatticeExpr<Bool>& expr)
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.
LCLELMask (const LCLELMask& other)
Copy constructor (copy semantics).
Destructor
LCLELMask& operator= (const LCLELMask& other)
Assignment (copy semantics)
Comparison
Clone a LCLELMask object.
virtual Bool lock (FileLocker::LockType, uInt nattempts)
virtual void unlock()
virtual Bool hasLock (FileLocker::LockType) const
Handle the (un)locking.
virtual void resync()
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.
Temporarily close the lattice.
It will be reopened automatically on the next access.
virtual void reopen()
Explicitly reopen the temporarily closed lattice.
Returns LCLELMask
Return region type. Returns the class name
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.
virtual LCRegion* doTranslate (const Vector<Float>& translateVector, const IPosition& newLatticeShape) const
Translating an LCLELMask is not possible, so it throws an exception.