LCStretch.h
Classes
- LCStretch -- Stretch length 1 axes in an LCRegion along straight lines (full description)
Interface
- Public Members
- LCStretch()
- LCStretch (const LCRegion& region, const IPosition& stretchAxes, const LCBox& stretchBox)
- LCStretch (Bool takeOver, const LCRegion* region, const IPosition& stretchAxes, const LCBox& stretchBox)
- LCStretch (const LCStretch& other)
- virtual ~LCStretch()
- LCStretch& operator= (const LCStretch& other)
- virtual Bool operator== (const LCRegion& other) const
- virtual LCRegion* cloneRegion() const
- const LCRegion& region() const
- const IPosition& stretchAxes() const
- const LCBox& stretchBox() const
- static String className()
- virtual String type() const
- virtual TableRecord toRecord (const String& tableName) const
- static LCStretch* 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)
- virtual IPosition doNiceCursorShape (uInt maxPixels) const
- Private Members
- void fill (const IPosition& stretchAxes, const LCBox& stretchBox)
Prerequisite
Synopsis
The LCStretch class is a specialization of class
LCRegion.
It makes it possible to stretch a LCRegion along straight lines to
other dimensions. E.g. a circle in the xy-plane can be stretched to
a cylinder in the xyz-space.
It can be used for a lattice of any dimensionality as long as the
dimensionality of the (hyper-)stretch matches the dimensionality of
the lattice.
Example
To Do
- Stretch along (slanted) cone lines
Member Description
LCStretch (const LCRegion& region, const IPosition& stretchAxes, const LCBox& stretchBox)
LCStretch (Bool takeOver, const LCRegion* region, const IPosition& stretchAxes, const LCBox& stretchBox)
Stretch the given region along axes as given by stretchAxes
from the bottom left corner (blc) to the top right corner (trc)
as given by stretchBox.
The axes to be stretched need to have length 1 in the original region.
Every kind of box (absolute, relative, fractional, unspecified)
can be used to define the stretch blc and trc.
The dimensionality of the LCStretch region is the same as the
dimensionality of the original region.
The second version takes over the pointer when the switch is true.
LCStretch (const LCStretch& other)
Copy constructor (copy semantics).
LCStretch& operator= (const LCStretch& other)
Assignment (copy semantics).
Comparison
Make a copy of the derived object.
Get the original region.
Get the stretch axes.
Get the stretch box.
Get the class name (to store in the record).
Get the region type. Returns the class name.
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.
This function is needed here because the niceCursorShape of the
contributing region does not make any sense (other dimensionality).
void fill (const IPosition& stretchAxes, const LCBox& stretchBox)
Fill the object.