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

Make the intersection of 2 or more regions. More...

#include <LCRegionMulti.h>

Inheritance diagram for casa::LCRegionMulti:
casa::LCRegion casa::Lattice< Bool > casa::LatticeBase casa::LCComplement casa::LCConcatenation casa::LCDifference casa::LCExtension casa::LCIntersection casa::LCStretch casa::LCUnion

List of all members.

Public Member Functions

 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.
 LCRegionMulti (const LCRegionMulti &other)
 Copy constructor (copy semantics).
virtual ~LCRegionMulti ()
LCRegionMultioperator= (const LCRegionMulti &other)
 Assignment (copy semantics).
virtual Bool operator== (const LCRegion &other) const
 Comparison.
virtual Bool hasMask () const
 Does the region have a mask?

Protected Member Functions

TableRecord makeRecord (const String &tableName) const
 Store the contributing regions in a 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.
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.
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.
virtual IPosition doNiceCursorShape (uInt maxPixels) const
 Get the best cursor shape.

Static Protected Member Functions

static void unmakeRecord (PtrBlock< const LCRegion * > &, const TableRecord &, const String &tableName)
 Retrieve the contributing objects from the record.

Private Member Functions

void init (Bool takeOver)
 Check if the regions are correct.

Private Attributes

Int itsHasMask
PtrBlock< const LCRegion * > itsRegions

Detailed Description

Make the intersection of 2 or more regions.

Intended use:

Public interface

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

Definition at line 75 of file LCRegionMulti.h.


Constructor & Destructor Documentation

casa::LCRegionMulti::LCRegionMulti ( const LCRegion region1,
const LCRegion region2 
)

Construct from 2 regions.

casa::LCRegionMulti::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.

casa::LCRegionMulti::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.

Copy constructor (copy semantics).

virtual casa::LCRegionMulti::~LCRegionMulti ( ) [virtual]
casa::LCRegionMulti::LCRegionMulti ( const LCRegion region,
const IPosition latticeShape 
) [protected]

Construct from lattice shape and region pointer, which is taken over.

Primarily meant for LCExtension.


Member Function Documentation

virtual Bool casa::LCRegionMulti::doGetSlice ( Array< Bool > &  buffer,
const Slicer section 
) [protected, virtual]

Do the actual getting of an array of values.

Implements casa::Lattice< Bool >.

virtual IPosition casa::LCRegionMulti::doNiceCursorShape ( uInt  maxPixels) const [protected, virtual]

Get the best cursor shape.

Reimplemented from casa::LatticeBase.

Reimplemented in casa::LCConcatenation, casa::LCExtension, and casa::LCStretch.

void casa::LCRegionMulti::fillHasMask ( ) [protected]

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

Bool casa::LCRegionMulti::findAreas ( IPosition bufStart,
IPosition bufEnd,
IPosition regStart,
IPosition regEnd,
const Slicer section,
uInt  regNr 
) const [protected]

Find which area of the section and region are needed.

False is returned if no part of the region is included in the section.

virtual Bool casa::LCRegionMulti::hasMask ( ) const [virtual]

Does the region have a mask?

Implements casa::LCRegion.

void casa::LCRegionMulti::init ( Bool  takeOver) [private]

Check if the regions are correct.

If needed, make a copy of the region objects.

TableRecord casa::LCRegionMulti::makeRecord ( const String tableName) const [protected]

Store the contributing regions in a record.

virtual void casa::LCRegionMulti::multiGetSlice ( Array< Bool > &  buffer,
const Slicer section 
) [protected, pure virtual]

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.

Implemented in casa::LCConcatenation, casa::LCExtension, casa::LCStretch, casa::LCUnion, casa::LCIntersection, casa::LCDifference, and casa::LCComplement.

void casa::LCRegionMulti::multiTranslate ( PtrBlock< const LCRegion * > &  ,
const Vector< Float > &  translateVector,
const IPosition newLatticeShape 
) const [protected]

Translate all regions.

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

Assignment (copy semantics).

virtual Bool casa::LCRegionMulti::operator== ( const LCRegion other) const [virtual]
const PtrBlock< const LCRegion * > & casa::LCRegionMulti::regions ( ) const [inline, protected]

Get the contributing regions.

Definition at line 170 of file LCRegionMulti.h.

References itsRegions.

Referenced by casa::LCExtension::region(), and casa::LCStretch::region().

static void casa::LCRegionMulti::unmakeRecord ( PtrBlock< const LCRegion * > &  ,
const TableRecord ,
const String tableName 
) [static, protected]

Retrieve the contributing objects from the record.


Member Data Documentation

Definition at line 165 of file LCRegionMulti.h.

Definition at line 166 of file LCRegionMulti.h.

Referenced by regions().


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