casacore::LCDifference Class Reference

Make the difference of 2 regions. More...

#include <LCDifference.h>

Inheritance diagram for casacore::LCDifference:
casacore::LCRegionMulti casacore::LCRegion casacore::Lattice< Bool > casacore::LatticeBase

List of all members.

Public Member Functions

 LCDifference ()
 LCDifference (const LCRegion &region1, const LCRegion &region2)
 Construct the difference region1 - region2.
 LCDifference (Bool takeOver, const PtrBlock< const LCRegion * > &regions)
 Construct from multiple regions given as a Block.
 LCDifference (const LCDifference &other)
 Copy constructor (copy semantics).
virtual ~LCDifference ()
LCDifferenceoperator= (const LCDifference &other)
 Assignment (copy semantics).
virtual Bool operator== (const LCRegion &other) const
 Comparison.
virtual LCRegioncloneRegion () const
 Make a copy of the derived object.
virtual String type () const
 Get the region type.
virtual TableRecord toRecord (const String &tableName) const
 Convert the (derived) object to a record.

Static Public Member Functions

static String className ()
 Get the class name (to store in the record).
static LCDifferencefromRecord (const TableRecord &, const String &tableName)
 Convert correct object from a record.

Protected Member Functions

virtual LCRegiondoTranslate (const Vector< Float > &translateVector, const IPosition &newLatticeShape) const
 Construct another LCRegion (for e.g.
virtual void multiGetSlice (Array< Bool > &buffer, const Slicer &section)
 Do the actual getting of the mask.

Private Member Functions

void defineBox ()
 Make the bounding box and determine the offsets.

Detailed Description

Make the difference of 2 regions.

Intended use:

Public interface

Prerequisite

Synopsis

The LCDifference class is a specialization of class LCRegion . It makes it possible to "subtract" one region from another. For example, imagine an overlapping box and circle. The box - circle is the box with the chunk taken out of it where the circle overlaps. The circle - box is the circle with the chunk taken out of it where the box overlaps.

The center of the difference must be inside the lattice

Example

Definition at line 72 of file LCDifference.h.


Constructor & Destructor Documentation

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

Construct the difference region1 - region2.

casacore::LCDifference::LCDifference ( 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::LCDifference::LCDifference ( const LCDifference other  ) 

Copy constructor (copy semantics).

virtual casacore::LCDifference::~LCDifference (  )  [virtual]

Member Function Documentation

static String casacore::LCDifference::className (  )  [static]

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

virtual LCRegion* casacore::LCDifference::cloneRegion (  )  const [virtual]

Make a copy of the derived object.

Implements casacore::LCRegion.

void casacore::LCDifference::defineBox (  )  [private]

Make the bounding box and determine the offsets.

virtual LCRegion* casacore::LCDifference::doTranslate ( const Vector< Float > &  translateVector,
const IPosition newLatticeShape 
) const [protected, virtual]

Construct another LCRegion (for e.g.

another lattice) by moving this one. It recalculates the bounding box and mask. A positive translation value indicates "to right".

Implements casacore::LCRegion.

static LCDifference* casacore::LCDifference::fromRecord ( const TableRecord ,
const String tableName 
) [static]

Convert correct object from a record.

Reimplemented from casacore::LCRegion.

virtual void casacore::LCDifference::multiGetSlice ( Array< Bool > &  buffer,
const Slicer section 
) [protected, virtual]

Do the actual getting of the mask.

Implements casacore::LCRegionMulti.

LCDifference& casacore::LCDifference::operator= ( const LCDifference other  ) 

Assignment (copy semantics).

Reimplemented from casacore::LCRegionMulti.

virtual Bool casacore::LCDifference::operator== ( const LCRegion other  )  const [virtual]

Comparison.

Reimplemented from casacore::LCRegionMulti.

virtual TableRecord casacore::LCDifference::toRecord ( const String tableName  )  const [virtual]

Convert the (derived) object to a record.

Implements casacore::LCRegion.

virtual String casacore::LCDifference::type (  )  const [virtual]

Get the region type.

Returns className()

Implements casacore::LCRegion.


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