WCCompound.h

Classes

WCCompound -- Base class for compound WCRegion objects. (full description)

class WCCompound : public WCRegion

Interface

Public Members
WCCompound (const ImageRegion& region1, const ImageRegion& region2)
WCCompound (const ImageRegion* region1, const ImageRegion* region2 = 0, const ImageRegion* region3 = 0, const ImageRegion* region4 = 0, const ImageRegion* region5 = 0, const ImageRegion* region6 = 0, const ImageRegion* region7 = 0, const ImageRegion* region8 = 0, const ImageRegion* region9 = 0, const ImageRegion* region10 = 0)
WCCompound (const PtrBlock<const ImageRegion*>& regions)
WCCompound (Bool takeOver, const PtrBlock<const WCRegion*>& regions)
WCCompound (const WCCompound& other)
virtual ~WCCompound()
virtual Bool operator==(const WCRegion& other) const
const PtrBlock<const WCRegion*>& regions() const
Protected Members
WCCompound& operator= (const WCCompound& other)
void multiToLCRegion (PtrBlock<const LCRegion*>& regions, const CoordinateSystem& cSys, const IPosition& shape, const IPosition& pixelAxesMap, const IPosition& extendAxes) const
TableRecord makeRecord (const String& tableName) const
static void unmakeRecord (PtrBlock<const WCRegion*>&, const TableRecord&, const String& tableName)
Private Members
void makeWCRegion (const PtrBlock<const ImageRegion*>&)
void init (Bool takeOver)

Description

Prerequisite

Synopsis

WCCompound is the base class for world coordinate regions. It defines the functionality simply as conversion to an LCRegion. This is because you need an LCRegion to be able to access the pixels in a Lattice.

The conversion functions should be flexible in that the supplied CoordinateSystem does not have to be the same as that with which the derived class was constructed. This means that you can apply a WCCompound from one image to another, provided that operation has some meaning.

Example


 

Member Description

WCCompound (const ImageRegion& region1, const ImageRegion& region2)
WCCompound (const ImageRegion* region1, const ImageRegion* region2 = 0, const ImageRegion* region3 = 0, const ImageRegion* region4 = 0, const ImageRegion* region5 = 0, const ImageRegion* region6 = 0, const ImageRegion* region7 = 0, const ImageRegion* region8 = 0, const ImageRegion* region9 = 0, const ImageRegion* region10 = 0)
WCCompound (const PtrBlock<const ImageRegion*>& regions)

Construct from one or more image regions. The image regions have to contain WCRegion objects, otherwise an exception is thrown.

WCCompound (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.

WCCompound (const WCCompound& other)

Copy constructor (copy semantics).

virtual ~WCCompound()

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

Comparison

const PtrBlock<const WCRegion*>& regions() const

Get the contributing regions.

WCCompound& operator= (const WCCompound& other)

Assignment (copy semantics) makes only sense for a derived class.

void multiToLCRegion (PtrBlock<const LCRegion*>& regions, const CoordinateSystem& cSys, const IPosition& shape, const IPosition& pixelAxesMap, const IPosition& extendAxes) const

Convert each WCRegion to an LCRegion. The axes argument tells which axes to use from the coordinate system and shape.

TableRecord makeRecord (const String& tableName) const

Store the contributing regions in a record.

static void unmakeRecord (PtrBlock<const WCRegion*>&, const TableRecord&, const String& tableName)

Retrieve the contributing objects from the record.

void makeWCRegion (const PtrBlock<const ImageRegion*>&)

Check if the ImageRegion's contain WCRegion's and extract them.

void init (Bool takeOver)

Check if the regions are correct. If needed, make a copy of the region objects.