casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::RegionHandlerMemory Class Reference

Class for keeping regions in memory. More...

#include <RegionHandlerMemory.h>

Inheritance diagram for casa::RegionHandlerMemory:
casa::RegionHandler

List of all members.

Public Member Functions

 RegionHandlerMemory ()
 RegionHandlerMemory (const RegionHandlerMemory &)
virtual ~RegionHandlerMemory ()
RegionHandlerMemoryoperator= (const RegionHandlerMemory &)
virtual RegionHandlerMemoryclone () const
 Make a copy of the object.
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 &region, 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 ImageRegiongetRegion (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< StringregionNames (RegionHandler::GroupType=Any) const
 Get the names of all regions/masks.
virtual ImageRegion makeMask (const LatticeBase &lattice, const String &name)
 
   

Private Member Functions

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

virtual ImageRegionfindRegion (const String &name, RegionHandler::GroupType=Any, Bool throwIfUnknown=True) const
 
   

void clear ()

Private Attributes

String itsDefaultName
SimpleOrderedMap< String, void * > * itsMaps [2]

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 RegionHandlerMemory.h.


Constructor & Destructor Documentation


Member Function Documentation

virtual Bool casa::RegionHandlerMemory::canDefineRegion ( ) const [virtual]

Can the class indeed define and handle regions? The default implementation returns False.

Reimplemented from casa::RegionHandler.

Make a copy of the object.

Reimplemented from casa::RegionHandler.

virtual Bool casa::RegionHandlerMemory::defineRegion ( const String name,
const ImageRegion region,
RegionHandler::GroupType  ,
Bool  overwrite = False 
) [virtual]

   

Reimplemented from casa::RegionHandler.

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

   

Int casa::RegionHandlerMemory::findRegionGroup ( const String regionName,
RegionHandler::GroupType  = Any,
Bool  throwIfUnknown = True 
) const [private]

   

   

Reimplemented from casa::RegionHandler.

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

   

Reimplemented from casa::RegionHandler.

Does the table have a region with the given name?

Reimplemented from casa::RegionHandler.

virtual ImageRegion casa::RegionHandlerMemory::makeMask ( const LatticeBase lattice,
const String name 
) [virtual]

   

Reimplemented from casa::RegionHandler.

RegionHandlerMemory& casa::RegionHandlerMemory::operator= ( const RegionHandlerMemory )

Get the names of all regions/masks.

Reimplemented from casa::RegionHandler.

virtual Bool casa::RegionHandlerMemory::removeRegion ( const String name,
RegionHandler::GroupType  = Any,
Bool  throwIfUnknown = True 
) [virtual]

   

Reimplemented from casa::RegionHandler.

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

   

Reimplemented from casa::RegionHandler.

virtual void casa::RegionHandlerMemory::setDefaultMask ( const String maskName) [virtual]

   

Reimplemented from casa::RegionHandler.


Member Data Documentation

Definition at line 183 of file RegionHandlerMemory.h.

Definition at line 184 of file RegionHandlerMemory.h.


The documentation for this class was generated from the following file: