casacore::LCRegionMulti Class Reference

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

#include <LCRegionMulti.h>

Inheritance diagram for casacore::LCRegionMulti:
casacore::LCRegion casacore::Lattice< Bool > casacore::LatticeBase casacore::LCComplement casacore::LCConcatenation casacore::LCDifference casacore::LCExtension casacore::LCIntersection casacore::LCStretch casacore::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 76 of file LCRegionMulti.h.


Constructor & Destructor Documentation

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

Construct from 2 regions.

casacore::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.

casacore::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.

casacore::LCRegionMulti::LCRegionMulti ( const LCRegionMulti other  ) 

Copy constructor (copy semantics).

virtual casacore::LCRegionMulti::~LCRegionMulti (  )  [virtual]
casacore::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 casacore::LCRegionMulti::doGetSlice ( Array< Bool > &  buffer,
const Slicer section 
) [protected, virtual]

Do the actual getting of an array of values.

Implements casacore::Lattice< Bool >.

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

Get the best cursor shape.

Reimplemented from casacore::LatticeBase.

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

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

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

Bool casacore::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 casacore::LCRegionMulti::hasMask (  )  const [virtual]

Does the region have a mask?

Implements casacore::LCRegion.

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

Check if the regions are correct.

If needed, make a copy of the region objects.

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

Store the contributing regions in a record.

virtual void casacore::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 casacore::LCComplement, casacore::LCConcatenation, casacore::LCDifference, casacore::LCExtension, casacore::LCIntersection, casacore::LCStretch, and casacore::LCUnion.

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

Translate all regions.

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

Get the contributing regions.

Definition at line 171 of file LCRegionMulti.h.

References itsRegions.

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

static void casacore::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 166 of file LCRegionMulti.h.

Definition at line 167 of file LCRegionMulti.h.

Referenced by regions().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1