casa
$Rev:20696$
|
Class for keeping regions in memory. More...
#include <RegionHandlerTable.h>
Public Types | |
typedef Table & | GetCallback (void *objectPtr, Bool writable) |
Public Member Functions | |
RegionHandlerTable (GetCallback *callback, void *objectPtr) | |
RegionHandlerTable (const RegionHandlerTable &) | |
virtual | ~RegionHandlerTable () |
RegionHandlerTable & | operator= (const RegionHandlerTable &) |
virtual RegionHandlerTable * | clone () const |
Make a copy of the object. | |
virtual void | setObjectPtr (void *objectPtr) |
Set the object pointer (for RegionHandlerTable's callback). | |
virtual Bool | canDefineRegion () const |
Can the class indeed define and handle regions? The default implementation returns False. | |
virtual void | setDefaultMask (const String &maskName) |
virtual String | getDefaultMask () const |
virtual Bool | defineRegion (const String &name, const ImageRegion ®ion, RegionHandler::GroupType, Bool overwrite=False) |
virtual Bool | hasRegion (const String &name, RegionHandler::GroupType=RegionHandler::Any) const |
Does the table have a region with the given name? | |
virtual ImageRegion * | getRegion (const String &name, RegionHandler::GroupType=Any, Bool throwIfUnknown=True) const |
virtual Bool | renameRegion (const String &newName, const String &oldName, RegionHandler::GroupType=Any, Bool overwrite=False) |
virtual Bool | removeRegion (const String &name, RegionHandler::GroupType=Any, Bool throwIfUnknown=True) |
virtual Vector< String > | regionNames (RegionHandler::GroupType=Any) const |
Get the names of all regions/masks. | |
virtual ImageRegion | makeMask (const LatticeBase &lattice, const String &name) |
Private Member Functions | |
Table & | rwTable () |
const Table & | table () const |
virtual Int | findRegionGroup (const String ®ionName, RegionHandler::GroupType=Any, Bool throwIfUnknown=True) const |
Private Attributes | |
GetCallback * | itsCallback |
void * | itsObjectPtr |
Class for keeping regions in memory.
Internal
Persistent regions are stored as subrecords of the table keywords "regions" and "masks". The user can choose one of both keywords. Keyword "masks" is meant for true image masks, i.e. telling for each pixel if it is good or bad. Keyword "regions" is meant for true regions in an image.
This class handles defining, getting and removing such regions. It is used by class
Definition at line 87 of file RegionHandlerTable.h.
typedef Table& casa::RegionHandlerTable::GetCallback(void *objectPtr, Bool writable) |
Definition at line 92 of file RegionHandlerTable.h.
casa::RegionHandlerTable::RegionHandlerTable | ( | GetCallback * | callback, |
void * | objectPtr | ||
) |
virtual casa::RegionHandlerTable::~RegionHandlerTable | ( | ) | [virtual] |
virtual Bool casa::RegionHandlerTable::canDefineRegion | ( | ) | const [virtual] |
Can the class indeed define and handle regions? The default implementation returns False.
Reimplemented from casa::RegionHandler.
virtual RegionHandlerTable* casa::RegionHandlerTable::clone | ( | ) | const [virtual] |
Make a copy of the object.
Reimplemented from casa::RegionHandler.
virtual Bool casa::RegionHandlerTable::defineRegion | ( | const String & | name, |
const ImageRegion & | region, | ||
RegionHandler::GroupType | , | ||
Bool | overwrite = False |
||
) | [virtual] |
Reimplemented from casa::RegionHandler.
virtual Int casa::RegionHandlerTable::findRegionGroup | ( | const String & | regionName, |
RegionHandler::GroupType | = Any , |
||
Bool | throwIfUnknown = True |
||
) | const [private, virtual] |
virtual String casa::RegionHandlerTable::getDefaultMask | ( | ) | const [virtual] |
Reimplemented from casa::RegionHandler.
virtual ImageRegion* casa::RegionHandlerTable::getRegion | ( | const String & | name, |
RegionHandler::GroupType | = Any , |
||
Bool | throwIfUnknown = True |
||
) | const [virtual] |
Reimplemented from casa::RegionHandler.
virtual Bool casa::RegionHandlerTable::hasRegion | ( | const String & | name, |
RegionHandler::GroupType | = RegionHandler::Any |
||
) | const [virtual] |
Does the table have a region with the given name?
Reimplemented from casa::RegionHandler.
virtual ImageRegion casa::RegionHandlerTable::makeMask | ( | const LatticeBase & | lattice, |
const String & | name | ||
) | [virtual] |
Reimplemented from casa::RegionHandler.
RegionHandlerTable& casa::RegionHandlerTable::operator= | ( | const RegionHandlerTable & | ) |
virtual Vector<String> casa::RegionHandlerTable::regionNames | ( | RegionHandler::GroupType | = Any | ) | const [virtual] |
Get the names of all regions/masks.
Reimplemented from casa::RegionHandler.
virtual Bool casa::RegionHandlerTable::removeRegion | ( | const String & | name, |
RegionHandler::GroupType | = Any , |
||
Bool | throwIfUnknown = True |
||
) | [virtual] |
Reimplemented from casa::RegionHandler.
virtual Bool casa::RegionHandlerTable::renameRegion | ( | const String & | newName, |
const String & | oldName, | ||
RegionHandler::GroupType | = Any , |
||
Bool | overwrite = False |
||
) | [virtual] |
Reimplemented from casa::RegionHandler.
Table& casa::RegionHandlerTable::rwTable | ( | ) | [inline, private] |
Definition at line 175 of file RegionHandlerTable.h.
References itsCallback, itsObjectPtr, and casa::True.
virtual void casa::RegionHandlerTable::setDefaultMask | ( | const String & | maskName | ) | [virtual] |
Reimplemented from casa::RegionHandler.
virtual void casa::RegionHandlerTable::setObjectPtr | ( | void * | objectPtr | ) | [virtual] |
Set the object pointer (for RegionHandlerTable's callback).
Default implementation does nothing.
Reimplemented from casa::RegionHandler.
const Table& casa::RegionHandlerTable::table | ( | ) | const [inline, private] |
Definition at line 177 of file RegionHandlerTable.h.
References casa::False, itsCallback, and itsObjectPtr.
GetCallback* casa::RegionHandlerTable::itsCallback [private] |
Definition at line 191 of file RegionHandlerTable.h.
void* casa::RegionHandlerTable::itsObjectPtr [private] |
Definition at line 192 of file RegionHandlerTable.h.