casacore
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
casacore::RegionManager Class Reference

#include <RegionManager.h>

Public Member Functions

 RegionManager ()
 blank constructor More...
 
 RegionManager (const CoordinateSystem &csys)
 
virtual ~RegionManager ()
 
String absreltype (const Int absrelval=0)
 
void setcoordsys (const CoordinateSystem &csys)
 
const CoordinateSystemgetcoordsys () const
 
Recordbox (const Vector< Double > &blc, const Vector< Double > &trc, const Vector< Double > &inc, const String &absrel, const Bool frac, const String &comment="")
 LCSlicer box. More...
 
Recordwbox (const Vector< Quantity > &blc, const Vector< Quantity > &trc, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel, const String &comment)
 
Recordwbox (const Vector< String > &blc, const Vector< String > &trc, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel, const String &comment)
 
Recordwbox (const Vector< Quantity > &blc, const Vector< Quantity > &trc, const Vector< Int > &pixelaxes, const String &absrel, const String &comment)
 
Recordwbox (const Vector< String > &blc, const Vector< String > &trc, const Vector< Int > &pixelaxes, const String &absrel, const String &comment)
 
ImageRegionwbox (const Vector< Quantity > &blc, const Vector< Quantity > &trc, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel="abs")
 
ImageRegionwpolygon (const Vector< Quantity > &x, const Vector< Quantity > &y, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel)
 Wpolygon with coordsys and if pixelaxes[0] is -1 then its assumed to be 0,1,... More...
 
ImageRegionwpolygon (const Vector< Quantity > &x, const Vector< Quantity > &y, const Vector< Int > &pixelaxes, const String &absrel)
 wpolygon version without csys...throws an exception if setcoordsys is not run More...
 
ImageRegionwellipse (const Quantity &xc, const Quantity &yc, const Quantity &a, const Quantity &b, const Quantity &pa, const uInt pixelAxis0, const uInt pixelAxis1, const String &absrel) const
 wellipse version without csys...throws an exception if setcoordsys is not run More...
 
ImageRegionwsphere (const Vector< Quantity > &center, const Quantity &radius, const Vector< Int > &pixelaxes, const String &absrel) const
 wsphere version without csys...throws an exception if setcoordsys is not run More...
 
ImageRegionwellipsoid (const Vector< Quantity > &center, const Vector< Quantity > &radii, const Vector< Int > &pixelaxes, const String &absrel) const
 
ImageRegionwshell (const Vector< Quantity > &center, const Vector< Quantity > &innerRadii, const Vector< Quantity > &outerRadii, const Vector< Int > &pixelaxes, const String &absrel) const
 
ImageRegiondoComplement (const WCRegion &reg1)
 Various versions of creating a complement region. More...
 
ImageRegiondoComplement (const PtrBlock< const WCRegion * > &reg1)
 
ImageRegiondoComplement (const ImageRegion &reg1)
 
ImageRegiondoConcatenation (const WCRegion &region, const WCBox &box)
 Various versions of concatenating a region onto another. More...
 
ImageRegiondoconcatenation (const PtrBlock< const WCRegion * > &regions, const WCBox &box)
 
ImageRegiondoConcatenation (const PtrBlock< const ImageRegion * > &regions, const TableRecord &box)
 
ImageRegiondoConcatenation (const Record &regions, const TableRecord &box)
 
ImageRegiondoDifference (const WCRegion &reg1, const WCRegion &reg2)
 Various versions of handling the difference of regions. More...
 
ImageRegiondoDifference (const PtrBlock< const WCRegion * > &reg1)
 
ImageRegiondoDifference (const ImageRegion &reg1, const ImageRegion &reg2)
 
ImageRegiondoIntersection (const WCRegion &reg1, const WCRegion &reg2)
 Different versions of intersecting regions. More...
 
ImageRegiondoIntersection (const PtrBlock< const WCRegion * > &reg1)
 
ImageRegiondoIntersection (const ImageRegion &reg1, const ImageRegion &reg2)
 
ImageRegiondoUnion (const WCRegion &reg1, const WCRegion &reg2)
 Different versions of unioning regions. More...
 
ImageRegiondoUnion (const PtrBlock< const WCRegion * > &reg1)
 
ImageRegiondoUnion (const ImageRegion &reg1, const ImageRegion &reg2) const
 
String imageRegionToTable (const String &tabName, const ImageRegion &imreg, const String &regName, Bool asmask=False)
 save region into a table (image, blank table or any other such) More...
 
String recordToTable (const String &tabName, const RecordInterface &rec, const String &regName="", Bool asmask=False)
 
RecordtableToRecord (const String &tabName, const String &regname)
 recover region from table More...
 
Vector< StringnamesInTable (const String &tabName)
 names of regions in table More...
 
Bool removeRegionInTable (const String &tabName, const String &regName)
 Remove a region from table...refuse is regionname is "". More...
 

Static Public Member Functions

static Bool isPixelRegion (const ImageRegion &reg)
 Some little but useful tidbits. More...
 
static Bool isWorldRegion (const ImageRegion &reg)
 
static Recordbox (const Vector< Double > &blc, const Vector< Double > &trc, const Vector< Int > &shape, const String &comment="")
 LCBox box. More...
 
static ImageRegionwellipse (const Quantity &xc, const Quantity &yc, const Quantity &a, const Quantity &b, const Quantity &pa, const uInt pixelAxis0, const uInt pixelAxis1, const CoordinateSystem &csys, const String &absrel)
 
static ImageRegionwsphere (const Vector< Quantity > &center, const Quantity &radius, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel)
 
static ImageRegionwellipsoid (const Vector< Quantity > &center, const Vector< Quantity > &radii, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel)
 
static ImageRegionwshell (const Vector< Quantity > &center, const Vector< Quantity > &innerRadii, const Vector< Quantity > &outerRadii, const Vector< Int > &pixelaxes, const CoordinateSystem &csys, const String &absrel)
 
static ImageRegionwmask (const String &command)
 
static RecordreadImageFile (String filename, String regionname)
 Reading of a file containing an ImageRegion in the AipsIO format dump. More...
 
static Bool writeImageFile (const String &file, const String &regionname, const Record &regionRecord)
 Writing a file of the AipsIO dump of the record representation of the region. More...
 

Protected Member Functions

LogIO_getLog () const
 

Private Member Functions

void toQuantity (Quantity &out, const String &in)
 Convert a string to Quantity. More...
 

Static Private Member Functions

static TablegetTable (void *ptr, Bool writable)
 Function to return the internal Table object to the RegionHandler. More...
 

Private Attributes

LogIOitsLog
 
std::unique_ptr< CoordinateSystemitsCSys
 
Table tab_p
 

Detailed Description

Definition at line 58 of file RegionManager.h.

Constructor & Destructor Documentation

◆ RegionManager() [1/2]

casacore::RegionManager::RegionManager ( )

blank constructor

◆ RegionManager() [2/2]

casacore::RegionManager::RegionManager ( const CoordinateSystem csys)

◆ ~RegionManager()

virtual casacore::RegionManager::~RegionManager ( )
virtual

Member Function Documentation

◆ _getLog()

LogIO* casacore::RegionManager::_getLog ( ) const
inlineprotected

Definition at line 260 of file RegionManager.h.

References itsLog.

◆ absreltype()

String casacore::RegionManager::absreltype ( const Int  absrelval = 0)

◆ box() [1/2]

Record* casacore::RegionManager::box ( const Vector< Double > &  blc,
const Vector< Double > &  trc,
const Vector< Double > &  inc,
const String absrel,
const Bool  frac,
const String comment = "" 
)

LCSlicer box.

◆ box() [2/2]

static Record* casacore::RegionManager::box ( const Vector< Double > &  blc,
const Vector< Double > &  trc,
const Vector< Int > &  shape,
const String comment = "" 
)
static

LCBox box.

◆ doComplement() [1/3]

ImageRegion* casacore::RegionManager::doComplement ( const ImageRegion reg1)

◆ doComplement() [2/3]

ImageRegion* casacore::RegionManager::doComplement ( const PtrBlock< const WCRegion * > &  reg1)

◆ doComplement() [3/3]

ImageRegion* casacore::RegionManager::doComplement ( const WCRegion reg1)

Various versions of creating a complement region.

◆ doConcatenation() [1/3]

ImageRegion* casacore::RegionManager::doConcatenation ( const PtrBlock< const ImageRegion * > &  regions,
const TableRecord box 
)

◆ doconcatenation()

ImageRegion* casacore::RegionManager::doconcatenation ( const PtrBlock< const WCRegion * > &  regions,
const WCBox box 
)

◆ doConcatenation() [2/3]

ImageRegion* casacore::RegionManager::doConcatenation ( const Record regions,
const TableRecord box 
)

◆ doConcatenation() [3/3]

ImageRegion* casacore::RegionManager::doConcatenation ( const WCRegion region,
const WCBox box 
)

Various versions of concatenating a region onto another.

◆ doDifference() [1/3]

ImageRegion* casacore::RegionManager::doDifference ( const ImageRegion reg1,
const ImageRegion reg2 
)

◆ doDifference() [2/3]

ImageRegion* casacore::RegionManager::doDifference ( const PtrBlock< const WCRegion * > &  reg1)

◆ doDifference() [3/3]

ImageRegion* casacore::RegionManager::doDifference ( const WCRegion reg1,
const WCRegion reg2 
)

Various versions of handling the difference of regions.

◆ doIntersection() [1/3]

ImageRegion* casacore::RegionManager::doIntersection ( const ImageRegion reg1,
const ImageRegion reg2 
)

◆ doIntersection() [2/3]

ImageRegion* casacore::RegionManager::doIntersection ( const PtrBlock< const WCRegion * > &  reg1)

◆ doIntersection() [3/3]

ImageRegion* casacore::RegionManager::doIntersection ( const WCRegion reg1,
const WCRegion reg2 
)

Different versions of intersecting regions.

◆ doUnion() [1/3]

ImageRegion* casacore::RegionManager::doUnion ( const ImageRegion reg1,
const ImageRegion reg2 
) const

◆ doUnion() [2/3]

ImageRegion* casacore::RegionManager::doUnion ( const PtrBlock< const WCRegion * > &  reg1)

◆ doUnion() [3/3]

ImageRegion* casacore::RegionManager::doUnion ( const WCRegion reg1,
const WCRegion reg2 
)

Different versions of unioning regions.

◆ getcoordsys()

const CoordinateSystem& casacore::RegionManager::getcoordsys ( ) const

◆ getTable()

static Table& casacore::RegionManager::getTable ( void *  ptr,
Bool  writable 
)
staticprivate

Function to return the internal Table object to the RegionHandler.

◆ imageRegionToTable()

String casacore::RegionManager::imageRegionToTable ( const String tabName,
const ImageRegion imreg,
const String regName,
Bool  asmask = False 
)

save region into a table (image, blank table or any other such)

◆ isPixelRegion()

static Bool casacore::RegionManager::isPixelRegion ( const ImageRegion reg)
static

Some little but useful tidbits.

◆ isWorldRegion()

static Bool casacore::RegionManager::isWorldRegion ( const ImageRegion reg)
static

◆ namesInTable()

Vector<String> casacore::RegionManager::namesInTable ( const String tabName)

names of regions in table

◆ readImageFile()

static Record* casacore::RegionManager::readImageFile ( String  filename,
String  regionname 
)
static

Reading of a file containing an ImageRegion in the AipsIO format dump.

◆ recordToTable()

String casacore::RegionManager::recordToTable ( const String tabName,
const RecordInterface rec,
const String regName = "",
Bool  asmask = False 
)

◆ removeRegionInTable()

Bool casacore::RegionManager::removeRegionInTable ( const String tabName,
const String regName 
)

Remove a region from table...refuse is regionname is "".

◆ setcoordsys()

void casacore::RegionManager::setcoordsys ( const CoordinateSystem csys)

◆ tableToRecord()

Record* casacore::RegionManager::tableToRecord ( const String tabName,
const String regname 
)

recover region from table

◆ toQuantity()

void casacore::RegionManager::toQuantity ( Quantity out,
const String in 
)
private

Convert a string to Quantity.

◆ wbox() [1/5]

Record* casacore::RegionManager::wbox ( const Vector< Quantity > &  blc,
const Vector< Quantity > &  trc,
const Vector< Int > &  pixelaxes,
const CoordinateSystem csys,
const String absrel,
const String comment 
)

◆ wbox() [2/5]

ImageRegion* casacore::RegionManager::wbox ( const Vector< Quantity > &  blc,
const Vector< Quantity > &  trc,
const Vector< Int > &  pixelaxes,
const CoordinateSystem csys,
const String absrel = "abs" 
)

◆ wbox() [3/5]

Record* casacore::RegionManager::wbox ( const Vector< Quantity > &  blc,
const Vector< Quantity > &  trc,
const Vector< Int > &  pixelaxes,
const String absrel,
const String comment 
)

◆ wbox() [4/5]

Record* casacore::RegionManager::wbox ( const Vector< String > &  blc,
const Vector< String > &  trc,
const Vector< Int > &  pixelaxes,
const CoordinateSystem csys,
const String absrel,
const String comment 
)

◆ wbox() [5/5]

Record* casacore::RegionManager::wbox ( const Vector< String > &  blc,
const Vector< String > &  trc,
const Vector< Int > &  pixelaxes,
const String absrel,
const String comment 
)

◆ wellipse() [1/2]

static ImageRegion* casacore::RegionManager::wellipse ( const Quantity xc,
const Quantity yc,
const Quantity a,
const Quantity b,
const Quantity pa,
const uInt  pixelAxis0,
const uInt  pixelAxis1,
const CoordinateSystem csys,
const String absrel 
)
static

◆ wellipse() [2/2]

ImageRegion* casacore::RegionManager::wellipse ( const Quantity xc,
const Quantity yc,
const Quantity a,
const Quantity b,
const Quantity pa,
const uInt  pixelAxis0,
const uInt  pixelAxis1,
const String absrel 
) const

wellipse version without csys...throws an exception if setcoordsys is not run

◆ wellipsoid() [1/2]

static ImageRegion* casacore::RegionManager::wellipsoid ( const Vector< Quantity > &  center,
const Vector< Quantity > &  radii,
const Vector< Int > &  pixelaxes,
const CoordinateSystem csys,
const String absrel 
)
static

◆ wellipsoid() [2/2]

ImageRegion* casacore::RegionManager::wellipsoid ( const Vector< Quantity > &  center,
const Vector< Quantity > &  radii,
const Vector< Int > &  pixelaxes,
const String absrel 
) const

◆ wmask()

static ImageRegion* casacore::RegionManager::wmask ( const String command)
static

◆ wpolygon() [1/2]

ImageRegion* casacore::RegionManager::wpolygon ( const Vector< Quantity > &  x,
const Vector< Quantity > &  y,
const Vector< Int > &  pixelaxes,
const CoordinateSystem csys,
const String absrel 
)

Wpolygon with coordsys and if pixelaxes[0] is -1 then its assumed to be 0,1,...

◆ wpolygon() [2/2]

ImageRegion* casacore::RegionManager::wpolygon ( const Vector< Quantity > &  x,
const Vector< Quantity > &  y,
const Vector< Int > &  pixelaxes,
const String absrel 
)

wpolygon version without csys...throws an exception if setcoordsys is not run

◆ writeImageFile()

static Bool casacore::RegionManager::writeImageFile ( const String file,
const String regionname,
const Record regionRecord 
)
static

Writing a file of the AipsIO dump of the record representation of the region.

◆ wshell() [1/2]

static ImageRegion* casacore::RegionManager::wshell ( const Vector< Quantity > &  center,
const Vector< Quantity > &  innerRadii,
const Vector< Quantity > &  outerRadii,
const Vector< Int > &  pixelaxes,
const CoordinateSystem csys,
const String absrel 
)
static

◆ wshell() [2/2]

ImageRegion* casacore::RegionManager::wshell ( const Vector< Quantity > &  center,
const Vector< Quantity > &  innerRadii,
const Vector< Quantity > &  outerRadii,
const Vector< Int > &  pixelaxes,
const String absrel 
) const

◆ wsphere() [1/2]

static ImageRegion* casacore::RegionManager::wsphere ( const Vector< Quantity > &  center,
const Quantity radius,
const Vector< Int > &  pixelaxes,
const CoordinateSystem csys,
const String absrel 
)
static

◆ wsphere() [2/2]

ImageRegion* casacore::RegionManager::wsphere ( const Vector< Quantity > &  center,
const Quantity radius,
const Vector< Int > &  pixelaxes,
const String absrel 
) const

wsphere version without csys...throws an exception if setcoordsys is not run

Member Data Documentation

◆ itsCSys

std::unique_ptr<CoordinateSystem> casacore::RegionManager::itsCSys
private

Definition at line 264 of file RegionManager.h.

◆ itsLog

LogIO* casacore::RegionManager::itsLog
private

Definition at line 263 of file RegionManager.h.

Referenced by _getLog().

◆ tab_p

Table casacore::RegionManager::tab_p
private

Definition at line 269 of file RegionManager.h.


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