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

Make the extension of an image region. More...

#include <WCExtension.h>

Inheritance diagram for casa::WCExtension:
casa::WCCompound casa::WCRegion

List of all members.

Public Member Functions

 WCExtension (const ImageRegion &region, const WCBox &extendBox)
 Construct the extension of an image region using the axes and blc,trc given in the extendBox.
 WCExtension (const WCExtension &other)
 Copy constructor (copy semantics).
virtual ~WCExtension ()
WCExtensionoperator= (const WCExtension &other)
 Assignment (copy semantics).
virtual Bool operator== (const WCRegion &other) const
 Comparison.
virtual WCRegioncloneRegion () const
 Make a copy of the derived object.
virtual String type () const
 Get the region type.
virtual TableRecord toRecord (const String &tableName) const
 Convert the (derived) object to a record.

Static Public Member Functions

static String className ()
 Get the class name (to store in the record).
static WCExtensionfromRecord (const TableRecord &, const String &tableName)
 Convert correct object from a record.

Protected Member Functions

virtual Bool canExtend () const
 WCExtension can extend a region if WCBox can do so.
virtual LCRegiondoToLCRegion (const CoordinateSystem &cSys, const IPosition &shape, const IPosition &pixelAxesMap, const IPosition &outOrder) const
 Convert to an LCRegion using the given coordinate system and shape.

Private Member Functions

 WCExtension (Bool takeOver, const PtrBlock< const WCRegion * > &regions)
 Construct from multiple regions given as a Block.
void findAxes (IPosition &extendBoxAxes, IPosition &stretchBoxAxes, IPosition &stretchRegionAxes) const
 Find the axes to be extended and stretched.

Detailed Description

Make the extension of an image region.

Intended use:

Public interface

Prerequisite

Synopsis

The WCExtension class is a specialization of class WCCompound . It makes it possible to extend a region along straight lines to other dimensions. It is also possible to extend existing axes with length 1, i.e. to stretch such axes. E.g. a circle in the RA,DEC plane can be extended to a cylinder in a RA,DEC,FREQ cube. It is possible to extend over more than one dimension. One can also limit the extension range E.g. in the forementioned example the circle can be extended for a given range of frequencies only.
The extension axes and ranges have to be given as a WCBox object. The axes which are part of the box and the region are the axes to be stretched. Box axes which are not part of the region are the extension axes.

Note that regions get automatically extended when a region is used for a higher dimensioned image. The extension is done for all unknown axes (for their entire length).

Example

Definition at line 85 of file WCExtension.h.


Constructor & Destructor Documentation

casa::WCExtension::WCExtension ( const ImageRegion region,
const WCBox extendBox 
)

Construct the extension of an image region using the axes and blc,trc given in the extendBox.

The axes in region and box have to be disjoint.

Copy constructor (copy semantics).

virtual casa::WCExtension::~WCExtension ( ) [virtual]
casa::WCExtension::WCExtension ( Bool  takeOver,
const PtrBlock< const WCRegion * > &  regions 
) [private]

Construct from multiple regions given as a Block.

When takeOver is True, the destructor will delete the given regions. Otherwise a copy of the regions is made.


Member Function Documentation

virtual Bool casa::WCExtension::canExtend ( ) const [protected, virtual]

WCExtension can extend a region if WCBox can do so.

Reimplemented from casa::WCRegion.

static String casa::WCExtension::className ( ) [static]

Get the class name (to store in the record).

virtual WCRegion* casa::WCExtension::cloneRegion ( ) const [virtual]

Make a copy of the derived object.

Implements casa::WCRegion.

virtual LCRegion* casa::WCExtension::doToLCRegion ( const CoordinateSystem cSys,
const IPosition shape,
const IPosition pixelAxesMap,
const IPosition outOrder 
) const [protected, virtual]

Convert to an LCRegion using the given coordinate system and shape.

pixelAxesMap(i) gives the pixel axis in cSys of axes i in the axesDesc.

Implements casa::WCRegion.

void casa::WCExtension::findAxes ( IPosition extendBoxAxes,
IPosition stretchBoxAxes,
IPosition stretchRegionAxes 
) const [private]

Find the axes to be extended and stretched.

The extend axes are the axis numbers in the box. For the stretch axes both box and region axes are returned.

static WCExtension* casa::WCExtension::fromRecord ( const TableRecord ,
const String tableName 
) [static]

Convert correct object from a record.

Reimplemented from casa::WCRegion.

WCExtension& casa::WCExtension::operator= ( const WCExtension other)

Assignment (copy semantics).

virtual Bool casa::WCExtension::operator== ( const WCRegion other) const [virtual]

Comparison.

Reimplemented from casa::WCCompound.

virtual TableRecord casa::WCExtension::toRecord ( const String tableName) const [virtual]

Convert the (derived) object to a record.

Implements casa::WCRegion.

virtual String casa::WCExtension::type ( ) const [virtual]

Get the region type.

Returns className()

Implements casa::WCRegion.


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