LCRegionMulti.h

Classes

LCRegionMulti -- Make the intersection of 2 or more regions. (full description)

class LCRegionMulti: public LCRegion

Interface

Public Members
LCRegionMulti()
LCRegionMulti (const LCRegion& region1, const LCRegion& region2)
LCRegionMulti (Bool takeOver, const LCRegion* region1, const LCRegion* region2 = 0, const LCRegion* region3 = 0, const LCRegion* region4 = 0, const LCRegion* region5 = 0, const LCRegion* region6 = 0, const LCRegion* region7 = 0, const LCRegion* region8 = 0, const LCRegion* region9 = 0, const LCRegion* region10 = 0)
LCRegionMulti (Bool takeOver, const PtrBlock<const LCRegion*>& regions)
LCRegionMulti (const LCRegionMulti& other)
virtual ~LCRegionMulti()
LCRegionMulti& operator= (const LCRegionMulti& other)
virtual Bool operator== (const LCRegion& other) const
virtual Bool hasMask() const
Protected Members
TableRecord makeRecord (const String& tableName) const
static void unmakeRecord (PtrBlock<const LCRegion*>&, const TableRecord&, const String& tableName)
void multiTranslate (PtrBlock<const LCRegion*>&, const Vector<Float>& translateVector, const IPosition& newLatticeShape) const
void fillHasMask()
Bool findAreas (IPosition& bufStart, IPosition& bufEnd, IPosition& regStart, IPosition& regEnd, const Slicer& section, uInt regNr) const
const PtrBlock<const LCRegion*>& regions() const
LCRegionMulti (const LCRegion* region, const IPosition& latticeShape)
virtual Bool doGetSlice (Array<Bool>& buffer, const Slicer& section)
virtual void multiGetSlice (Array<Bool>& buffer, const Slicer& section) = 0
virtual IPosition doNiceCursorShape (uInt maxPixels) const
Private Members
void init (Bool takeOver)

Description

Prerequisite

Synopsis

The LCRegionMulti class is a specialization of class LCRegion. It makes it possible to extend a LCRegion along straight lines to other dimensions. E.g. a circle in the xy-plane can be extended to a cylinder in the xyz-space. includes the intersection border. It can only be used for a lattice of any dimensionality as long as the dimensionality of the (hyper-)intersection matches the dimensionality of the lattice.

The center of the intersection must be inside the lattice

Example


 

To Do

Member Description

LCRegionMulti()

LCRegionMulti (const LCRegion& region1, const LCRegion& region2)

Construct from 2 regions.

LCRegionMulti (Bool takeOver, const LCRegion* region1, const LCRegion* region2 = 0, const LCRegion* region3 = 0, const LCRegion* region4 = 0, const LCRegion* region5 = 0, const LCRegion* region6 = 0, const LCRegion* region7 = 0, const LCRegion* region8 = 0, const LCRegion* region9 = 0, const LCRegion* region10 = 0)

Construct from multiple regions.

LCRegionMulti (Bool takeOver, const PtrBlock<const LCRegion*>& 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.

LCRegionMulti (const LCRegionMulti& other)

Copy constructor (copy semantics).

virtual ~LCRegionMulti()

LCRegionMulti& operator= (const LCRegionMulti& other)

Assignment (copy semantics).

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

Comparison

virtual Bool hasMask() const

Does the region have a mask?

TableRecord makeRecord (const String& tableName) const

Store the contributing regions in a record.

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

Retrieve the contributing objects from the record.

void multiTranslate (PtrBlock<const LCRegion*>&, const Vector<Float>& translateVector, const IPosition& newLatticeShape) const

Translate all regions.

void fillHasMask()

Determine if all regions have mask (used by LCIntersection).

Bool findAreas (IPosition& bufStart, IPosition& bufEnd, IPosition& regStart, IPosition& regEnd, const Slicer& section, uInt regNr) const

Find which area of the section and region are needed. False is returned if no part of the region is included in the section.

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

Get the contributing regions.

LCRegionMulti (const LCRegion* region, const IPosition& latticeShape)

Construct from lattice shape and region pointer, which is taken over. Primarily meant for LCExtension.

virtual Bool doGetSlice (Array<Bool>& buffer, const Slicer& section)

Do the actual getting of an array of values.

virtual void multiGetSlice (Array<Bool>& buffer, const Slicer& section) = 0

Get the values from the class derived from Multi. It is called when there is a mask. Note that it is not sure whether the buffer has the correct size.

virtual IPosition doNiceCursorShape (uInt maxPixels) const

Get the best cursor shape.

void init (Bool takeOver)

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