casa
$Rev:20696$
|
Class for keeping regions in an HDF5 file. More...
#include <RegionHandlerHDF5.h>
Public Types | |
typedef const CountedPtr < HDF5File > & | GetCallback (void *objectPtr) |
Public Member Functions | |
RegionHandlerHDF5 (GetCallback *callback, void *objectPtr) | |
RegionHandlerHDF5 (const RegionHandlerHDF5 &) | |
virtual | ~RegionHandlerHDF5 () |
RegionHandlerHDF5 & | operator= (const RegionHandlerHDF5 &) |
virtual RegionHandlerHDF5 * | 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) |
void | save (Bool always=False) |
void | restore () |
Private Member Functions | |
const CountedPtr< HDF5File > & | file () const |
virtual Int | findRegionGroup (const String ®ionName, RegionHandler::GroupType=Any, Bool throwIfUnknown=True) const |
Private Attributes | |
TableRecord | itsRecord |
Bool | itsChanged |
GetCallback * | itsCallback |
void * | itsObjectPtr |
Class for keeping regions in an HDF5 file.
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 85 of file RegionHandlerHDF5.h.
typedef const CountedPtr<HDF5File>& casa::RegionHandlerHDF5::GetCallback(void *objectPtr) |
Definition at line 89 of file RegionHandlerHDF5.h.
casa::RegionHandlerHDF5::RegionHandlerHDF5 | ( | GetCallback * | callback, |
void * | objectPtr | ||
) |
virtual casa::RegionHandlerHDF5::~RegionHandlerHDF5 | ( | ) | [virtual] |
virtual Bool casa::RegionHandlerHDF5::canDefineRegion | ( | ) | const [virtual] |
Can the class indeed define and handle regions? The default implementation returns False.
Reimplemented from casa::RegionHandler.
virtual RegionHandlerHDF5* casa::RegionHandlerHDF5::clone | ( | ) | const [virtual] |
Make a copy of the object.
Reimplemented from casa::RegionHandler.
virtual Bool casa::RegionHandlerHDF5::defineRegion | ( | const String & | name, |
const ImageRegion & | region, | ||
RegionHandler::GroupType | , | ||
Bool | overwrite = False |
||
) | [virtual] |
Reimplemented from casa::RegionHandler.
const CountedPtr<HDF5File>& casa::RegionHandlerHDF5::file | ( | ) | const [inline, private] |
Definition at line 178 of file RegionHandlerHDF5.h.
References itsCallback, and itsObjectPtr.
virtual Int casa::RegionHandlerHDF5::findRegionGroup | ( | const String & | regionName, |
RegionHandler::GroupType | = Any , |
||
Bool | throwIfUnknown = True |
||
) | const [private, virtual] |
virtual String casa::RegionHandlerHDF5::getDefaultMask | ( | ) | const [virtual] |
Reimplemented from casa::RegionHandler.
virtual ImageRegion* casa::RegionHandlerHDF5::getRegion | ( | const String & | name, |
RegionHandler::GroupType | = Any , |
||
Bool | throwIfUnknown = True |
||
) | const [virtual] |
Reimplemented from casa::RegionHandler.
virtual Bool casa::RegionHandlerHDF5::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::RegionHandlerHDF5::makeMask | ( | const LatticeBase & | lattice, |
const String & | name | ||
) | [virtual] |
Reimplemented from casa::RegionHandler.
RegionHandlerHDF5& casa::RegionHandlerHDF5::operator= | ( | const RegionHandlerHDF5 & | ) |
virtual Vector<String> casa::RegionHandlerHDF5::regionNames | ( | RegionHandler::GroupType | = Any | ) | const [virtual] |
Get the names of all regions/masks.
Reimplemented from casa::RegionHandler.
virtual Bool casa::RegionHandlerHDF5::removeRegion | ( | const String & | name, |
RegionHandler::GroupType | = Any , |
||
Bool | throwIfUnknown = True |
||
) | [virtual] |
Reimplemented from casa::RegionHandler.
virtual Bool casa::RegionHandlerHDF5::renameRegion | ( | const String & | newName, |
const String & | oldName, | ||
RegionHandler::GroupType | = Any , |
||
Bool | overwrite = False |
||
) | [virtual] |
Reimplemented from casa::RegionHandler.
void casa::RegionHandlerHDF5::restore | ( | ) |
void casa::RegionHandlerHDF5::save | ( | Bool | always = False | ) |
virtual void casa::RegionHandlerHDF5::setDefaultMask | ( | const String & | maskName | ) | [virtual] |
Reimplemented from casa::RegionHandler.
virtual void casa::RegionHandlerHDF5::setObjectPtr | ( | void * | objectPtr | ) | [virtual] |
Set the object pointer (for RegionHandlerTable's callback).
Default implementation does nothing.
Reimplemented from casa::RegionHandler.
GetCallback* casa::RegionHandlerHDF5::itsCallback [private] |
Definition at line 192 of file RegionHandlerHDF5.h.
Referenced by file().
Bool casa::RegionHandlerHDF5::itsChanged [private] |
Definition at line 191 of file RegionHandlerHDF5.h.
void* casa::RegionHandlerHDF5::itsObjectPtr [private] |
Definition at line 193 of file RegionHandlerHDF5.h.
Referenced by file().
Definition at line 190 of file RegionHandlerHDF5.h.