Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1RegionHandlerTable.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 23:08:19 2011
Кодировка:

Поисковые слова: п п п п п п п п п п п р п р п р п р п р п р п р п р п
casacore: casa::RegionHandlerTable Class Reference
Public Types | Public Member Functions | Private Member Functions | Private Attributes

casa::RegionHandlerTable Class Reference
[Regions_module_internal_classes]

Class for keeping regions in memory. More...

#include <RegionHandlerTable.h>

Inheritance diagram for casa::RegionHandlerTable:
casa::RegionHandler

List of all members.

Public Types

typedef TableGetCallback (void *objectPtr, Bool writable)

Public Member Functions

 RegionHandlerTable (GetCallback *callback, void *objectPtr)
 RegionHandlerTable (const RegionHandlerTable &)
virtual ~RegionHandlerTable ()
RegionHandlerTableoperator= (const RegionHandlerTable &)
virtual RegionHandlerTableclone () 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)
 Set the default mask to the mask with the given name.
virtual String getDefaultMask () const
 Get the name of the default mask.
virtual Bool defineRegion (const String &name, const ImageRegion &region, RegionHandler::GroupType, Bool overwrite=False)
 Define a region belonging to the table.
virtual Bool hasRegion (const String &name, RegionHandler::GroupType=RegionHandler::Any) const
 Does the table have a region with the given name?
virtual ImageRegiongetRegion (const String &name, RegionHandler::GroupType=Any, Bool throwIfUnknown=True) const
 Get a region belonging to the table.
virtual Bool renameRegion (const String &newName, const String &oldName, RegionHandler::GroupType=Any, Bool overwrite=False)
 Rename a region.
virtual Bool removeRegion (const String &name, RegionHandler::GroupType=Any, Bool throwIfUnknown=True)
 Remove a region belonging to the table.
virtual Vector< StringregionNames (RegionHandler::GroupType=Any) const
 Get the names of all regions/masks.
virtual ImageRegion makeMask (const LatticeBase &lattice, const String &name)
 Make a mask for a lattice (e.g.

Private Member Functions

TablerwTable ()
const Tabletable () const
virtual Int findRegionGroup (const String &regionName, RegionHandler::GroupType=Any, Bool throwIfUnknown=True) const

Private Attributes

GetCallbackitsCallback
void * itsObjectPtr

Detailed Description

Class for keeping regions in memory.

Intended use:

Internal

Review Status

Test programs:
tPagedImage2

Prerequisite

Synopsis

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.


Member Typedef Documentation

typedef Table& casa::RegionHandlerTable::GetCallback(void *objectPtr, Bool writable)

Definition at line 92 of file RegionHandlerTable.h.


Constructor & Destructor Documentation

casa::RegionHandlerTable::RegionHandlerTable ( GetCallback callback,
void *  objectPtr 
)
casa::RegionHandlerTable::RegionHandlerTable ( const RegionHandlerTable  ) 
virtual casa::RegionHandlerTable::~RegionHandlerTable (  )  [virtual]

Member Function Documentation

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]

Define a region belonging to the table.

The group type determines if it stored as a region or mask. If overwrite=False, an exception will be thrown if the region already exists in the "regions" or "masks" keyword. Otherwise the region will be removed first.
A False status is returned if the table is not writable

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]

Get the name of the default mask.

An empty string is returned if no default mask.

Reimplemented from casa::RegionHandler.

virtual ImageRegion* casa::RegionHandlerTable::getRegion ( const String name,
RegionHandler::GroupType  = Any,
Bool  throwIfUnknown = True 
) const [virtual]

Get a region belonging to the table.

A zero pointer is returned if the region does not exist. The caller has to delete the ImageRegion object created.
No exception is thrown if the region does not exist.

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]

Make a mask for a lattice (e.g.

a PagedImage or TempImage). It creates it with the shape and tile shape of the lattice.

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]

Remove a region belonging to the table.


Optionally an exception is thrown if the region does not exist.
A False status is returned if the table is not writable

Reimplemented from casa::RegionHandler.

virtual Bool casa::RegionHandlerTable::renameRegion ( const String newName,
const String oldName,
RegionHandler::GroupType  = Any,
Bool  overwrite = False 
) [virtual]

Rename a region.

If a region with the new name already exists, it is deleted or an exception is thrown (depending on overwrite). The region name is looked up in the given group(s).
An exception is thrown if the old region name does not exist.

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]

Set the default mask to the mask with the given name.

It constructs a ImageRegion object for the new default mask. If the table is writable, the setting is persistent by writing the name as a keyword. If the given maskName is the empty string, the default mask is unset.

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.


Member Data Documentation

Definition at line 191 of file RegionHandlerTable.h.

Referenced by rwTable(), and table().

Definition at line 192 of file RegionHandlerTable.h.

Referenced by rwTable(), and table().


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