LCDifference.h
Classes
- LCDifference -- Make the difference of 2 regions. (full description)
Interface
- Public Members
- LCDifference()
- LCDifference (const LCRegion& region1, const LCRegion& region2)
- LCDifference (Bool takeOver, const PtrBlock<const LCRegion*>& regions)
- LCDifference (const LCDifference& other)
- virtual ~LCDifference()
- LCDifference& operator= (const LCDifference& other)
- virtual Bool operator== (const LCRegion& other) const
- virtual LCRegion* cloneRegion() const
- static String className()
- virtual String type() const
- virtual TableRecord toRecord (const String& tableName) const
- static LCDifference* fromRecord (const TableRecord&, const String& tableName)
- Protected Members
- virtual LCRegion* doTranslate (const Vector<Float>& translateVector, const IPosition& newLatticeShape) const
- virtual void multiGetSlice (Array<Bool>& buffer, const Slicer& section)
- Private Members
- void defineBox()
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
To Do
Member Description
Construct the difference region1 - region2.
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.
LCDifference (const LCDifference& other)
Copy constructor (copy semantics).
LCDifference& operator= (const LCDifference& other)
Assignment (copy semantics).
Comparison
Make a copy of the derived object.
Get the class name (to store in the record).
Get the region type. Returns className()
Convert the (derived) object to a record.
Convert correct object from a record.
virtual LCRegion* doTranslate (const Vector<Float>& translateVector, const IPosition& newLatticeShape) const
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".
Do the actual getting of the mask.
Make the bounding box and determine the offsets.