WCExtension.h

Classes

WCExtension -- Make the extension of an image region. (full description)

class WCExtension: public WCCompound

Interface

Public Members
WCExtension (const ImageRegion& region, const WCBox& extendBox)
WCExtension (const WCExtension& other)
virtual ~WCExtension()
WCExtension& operator= (const WCExtension& other)
virtual Bool operator== (const WCRegion& other) const
virtual WCRegion* cloneRegion() const
static String className()
virtual String type() const
virtual TableRecord toRecord (const String& tableName) const
static WCExtension* fromRecord (const TableRecord&, const String& tableName)
Protected Members
virtual Bool canExtend() const
virtual LCRegion* doToLCRegion (const CoordinateSystem& cSys, const IPosition& shape, const IPosition& pixelAxesMap, const IPosition& outOrder) const
Private Members
WCExtension (Bool takeOver, const PtrBlock<const WCRegion*>& regions)
void findAxes (IPosition& extendBoxAxes, IPosition& stretchBoxAxes, IPosition& stretchRegionAxes) const

Description

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


 

Member Description

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.

WCExtension (const WCExtension& other)

Copy constructor (copy semantics).

virtual ~WCExtension()

WCExtension& operator= (const WCExtension& other)

Assignment (copy semantics).

virtual Bool operator== (const WCRegion& other) const

Comparison

virtual WCRegion* cloneRegion() const

Make a copy of the derived object.

static String className()

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

virtual String type() const

Get the region type. Returns className()

virtual TableRecord toRecord (const String& tableName) const

Convert the (derived) object to a record.

static WCExtension* fromRecord (const TableRecord&, const String& tableName)

Convert correct object from a record.

virtual Bool canExtend() const

WCExtension can extend a region if WCBox can do so.

virtual LCRegion* doToLCRegion (const CoordinateSystem& cSys, const IPosition& shape, const IPosition& pixelAxesMap, const IPosition& outOrder) const

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.

WCExtension (Bool takeOver, const PtrBlock<const WCRegion*>& regions)

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.

void findAxes (IPosition& extendBoxAxes, IPosition& stretchBoxAxes, IPosition& stretchRegionAxes) const

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.