casacore::LCMask Class Reference

Class to define a rectangular mask as a temporary region. More...

#include <LCMask.h>

Inheritance diagram for casacore::LCMask:
casacore::LCRegionSingle casacore::LCRegion casacore::Lattice< Bool > casacore::LatticeBase

List of all members.

Public Member Functions

 LCMask ()
 LCMask (const IPosition &latticeShape)
 Construct an LCMask object for a full lattice with the given shape.
 LCMask (Lattice< Bool > &mask)
 Construct an LCMask object for a full lattice with the shape of the mask.
 LCMask (const IPosition &maskShape, const LCBox &box)
 Construct an LCMask object for the part of a lattice given by the box.
 LCMask (Lattice< Bool > &mask, const LCBox &box)
 Construct an LCMask object for the part of a lattice given by the box.
 LCMask (const LCMask &other)
 Copy constructor (copy semantics).
virtual ~LCMask ()
 Destructor.
LCMaskoperator= (const LCMask &other)
 Assignment (reference semantics).
virtual Bool operator== (const LCRegion &other) const
 Comparison.
virtual LCRegioncloneRegion () const
 Make a copy of the derived object.
virtual LatticeIterInterface
< Bool > * 
makeIter (const LatticeNavigator &navigator, Bool useRef) const
 This function is used by the LatticeIterator class to generate an iterator of the correct type for this Lattice.
virtual uInt advisedMaxPixels () const
 Returns the maximum recommended number of pixels for a cursor.
virtual IPosition doNiceCursorShape (uInt maxPixels) const
 Help the user pick a cursor for most efficient access.
virtual uInt maximumCacheSize () const
 Maximum size - not necessarily all used.
virtual void setMaximumCacheSize (uInt howManyPixels)
 Set the maximum (allowed) cache size as indicated.
virtual void setCacheSizeFromPath (const IPosition &sliceShape, const IPosition &windowStart, const IPosition &windowLength, const IPosition &axisPath)
 Set the cache size as to "fit" the indicated path.
virtual void setCacheSizeInTiles (uInt howManyTiles)
 Set the actual cache size for this Array to be be big enough for the indicated number of tiles.
virtual void clearCache ()
 Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called.
virtual void showCacheStatistics (ostream &os) const
 Report on cache success.
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 object with the contenta tof the possible file.
virtual void flush ()
 Flush the data (but do not unlock).
virtual void tempClose ()
 Temporarily close the lattice.
virtual void reopen ()
 Explicitly reopen the temporarily closed lattice.
virtual String type () const
 Region type.
virtual TableRecord toRecord (const String &tableName) const
 Convert the (derived) object to a record.
virtual Bool isWritable () const
 An LCMask is writable if the underlying Lattice is.

Static Public Member Functions

static String className ()
 Get the class name (to store in the record).

Protected Member Functions

virtual LCRegiondoTranslate (const Vector< Float > &translateVector, const IPosition &newLatticeShape) const
 Construct another LCMask (for e.g.

Private Attributes

LCBox itsBox
Lattice< Bool > * itsMask

Detailed Description

Class to define a rectangular mask as a temporary region.

Intended use:

Public interface

Prerequisite

Synopsis

The LCMask class is a specialization of class LCRegion .
It can be used to define a temporary mask (e.g. for a TempImage ). It is possible to define the mask for the full lattice, but one can also define it for part of a lattice. In the latter case a LCBox has to be given as well to define for which part of the image the mask has to be used.

Example

Definition at line 73 of file LCMask.h.


Constructor & Destructor Documentation

casacore::LCMask::LCMask (  ) 
casacore::LCMask::LCMask ( const IPosition latticeShape  )  [explicit]

Construct an LCMask object for a full lattice with the given shape.

It creates a TempLattice<Bool> to hold the mask.

casacore::LCMask::LCMask ( Lattice< Bool > &  mask  )  [explicit]

Construct an LCMask object for a full lattice with the shape of the mask.

It clones the mask object.

casacore::LCMask::LCMask ( const IPosition maskShape,
const LCBox box 
)

Construct an LCMask object for the part of a lattice given by the box.

The box defines the position of the mask in the lattice. The box shape and given mask shape should be equal. It creates a TempImage<Bool> to hold the mask.

casacore::LCMask::LCMask ( Lattice< Bool > &  mask,
const LCBox box 
)

Construct an LCMask object for the part of a lattice given by the box.

The box defines the position of the mask in the lattice. The box shape and given mask shape should be equal. It clones the mask object.

casacore::LCMask::LCMask ( const LCMask other  ) 

Copy constructor (copy semantics).

virtual casacore::LCMask::~LCMask (  )  [virtual]

Destructor.


Member Function Documentation

virtual uInt casacore::LCMask::advisedMaxPixels (  )  const [virtual]

Returns the maximum recommended number of pixels for a cursor.

This is the number of pixels in a tile.

Reimplemented from casacore::Lattice< Bool >.

static String casacore::LCMask::className (  )  [static]

Get the class name (to store in the record).

virtual void casacore::LCMask::clearCache (  )  [virtual]

Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called.

Reimplemented from casacore::LatticeBase.

virtual LCRegion* casacore::LCMask::cloneRegion (  )  const [virtual]

Make a copy of the derived object.

Implements casacore::LCRegion.

virtual IPosition casacore::LCMask::doNiceCursorShape ( uInt  maxPixels  )  const [virtual]

Help the user pick a cursor for most efficient access.

Reimplemented from casacore::LCRegionSingle.

virtual LCRegion* casacore::LCMask::doTranslate ( const Vector< Float > &  translateVector,
const IPosition newLatticeShape 
) const [protected, virtual]

Construct another LCMask (for e.g.

another lattice) by moving this one. It recalculates the bounding mask. A positive translation value indicates "to right".

Implements casacore::LCRegion.

virtual void casacore::LCMask::flush (  )  [virtual]

Flush the data (but do not unlock).

Reimplemented from casacore::LatticeBase.

virtual Bool casacore::LCMask::hasLock ( FileLocker::LockType   )  const [virtual]

Reimplemented from casacore::LatticeBase.

virtual Bool casacore::LCMask::isWritable (  )  const [virtual]

An LCMask is writable if the underlying Lattice is.

Reimplemented from casacore::LCRegion.

virtual Bool casacore::LCMask::lock ( FileLocker::LockType  ,
uInt  nattempts 
) [virtual]

Handle the (un)locking.

Reimplemented from casacore::LatticeBase.

virtual LatticeIterInterface<Bool>* casacore::LCMask::makeIter ( const LatticeNavigator navigator,
Bool  useRef 
) const [virtual]

This function is used by the LatticeIterator class to generate an iterator of the correct type for this Lattice.

Not recommended for general use.

Reimplemented from casacore::LCRegionSingle.

virtual uInt casacore::LCMask::maximumCacheSize (  )  const [virtual]

Maximum size - not necessarily all used.

In pixels.

Reimplemented from casacore::LatticeBase.

LCMask& casacore::LCMask::operator= ( const LCMask other  ) 

Assignment (reference semantics).

Reimplemented from casacore::LCRegionSingle.

virtual Bool casacore::LCMask::operator== ( const LCRegion other  )  const [virtual]

Comparison.

virtual void casacore::LCMask::reopen (  )  [virtual]

Explicitly reopen the temporarily closed lattice.

Reimplemented from casacore::LatticeBase.

virtual void casacore::LCMask::resync (  )  [virtual]

Resynchronize the object with the contenta tof the possible 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::LCMask::setCacheSizeFromPath ( const IPosition sliceShape,
const IPosition windowStart,
const IPosition windowLength,
const IPosition axisPath 
) [virtual]

Set the cache size as to "fit" the indicated path.

Reimplemented from casacore::LatticeBase.

virtual void casacore::LCMask::setCacheSizeInTiles ( uInt  howManyTiles  )  [virtual]

Set the actual cache size for this Array to be be big enough for the indicated number of tiles.

This cache is not shared with PagedArrays in other rows and is always clipped to be less than the maximum value set using the setMaximumCacheSize member function. tiles. Tiles are cached using a first in first out algorithm.

Reimplemented from casacore::LatticeBase.

virtual void casacore::LCMask::setMaximumCacheSize ( uInt  howManyPixels  )  [virtual]

Set the maximum (allowed) cache size as indicated.

Reimplemented from casacore::LatticeBase.

virtual void casacore::LCMask::showCacheStatistics ( ostream &  os  )  const [virtual]

Report on cache success.

Reimplemented from casacore::LatticeBase.

virtual void casacore::LCMask::tempClose (  )  [virtual]

Temporarily close the lattice.

It will be reopened automatically on the next access.

Reimplemented from casacore::LatticeBase.

virtual TableRecord casacore::LCMask::toRecord ( const String tableName  )  const [virtual]

Convert the (derived) object to a record.

This cannot be done and results in an exception.

Implements casacore::LCRegion.

virtual String casacore::LCMask::type (  )  const [virtual]

Region type.

Returns class name.

Implements casacore::LCRegion.

virtual void casacore::LCMask::unlock (  )  [virtual]

Reimplemented from casacore::LatticeBase.


Member Data Documentation

Definition at line 198 of file LCMask.h.

Definition at line 199 of file LCMask.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1