LCBox.h

Classes

LCBox -- Class to define a rectangular box of interest. (full description)

class LCBox: public LCRegionFixed

Interface

Public Members
LCBox()
explicit LCBox (const IPosition& latticeShape)
LCBox (const Slicer& box, const IPosition& latticeShape)
LCBox (const IPosition& blc, const IPosition& trc, const IPosition& latticeShape)
LCBox (const Vector<Float>& blc, const Vector<Float>& trc, const IPosition& latticeShape)
LCBox (const Vector<Double>& blc, const Vector<Double>& trc, const IPosition& latticeShape)
LCBox (const LCBox& other)
virtual ~LCBox()
LCBox& operator= (const LCBox& 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 LCBox* fromRecord (const TableRecord&, const String& tablename)
Vector<Float> blc() const
Vector<Float> trc() const
static Bool verify (IPosition& blc, IPosition& trc, IPosition& inc, const IPosition& shape)
Protected Members
virtual LCRegion* doTranslate (const Vector<Float>& translateVector, const IPosition& newLatticeShape) const
Private Members
void setSlicerBox (const IPosition& blc, const IPosition& trc)
void fillBlcTrc()

Description

Prerequisite

Synopsis

The LCBox class is a specialization of class LCRegion. It makes it possible to define a rectangular region of interest.

Example


 

To Do

Member Description

LCBox()

explicit LCBox (const IPosition& latticeShape)

Construct a box for the full lattice shape.

LCBox (const Slicer& box, const IPosition& latticeShape)

Construct from the Slicer defining the box. The slicer may not contain a stride.

LCBox (const IPosition& blc, const IPosition& trc, const IPosition& latticeShape)

Construct from the IPosition's defining the bottom-left and top-right corner of the box.

LCBox (const Vector<Float>& blc, const Vector<Float>& trc, const IPosition& latticeShape)
LCBox (const Vector<Double>& blc, const Vector<Double>& trc, const IPosition& latticeShape)

Construct from the Vector's defining the bottom-left and top-right corner of the box.

LCBox (const LCBox& other)

Copy constructor (reference semantics).

virtual ~LCBox()

LCBox& operator= (const LCBox& other)

Assignment (copy semantics).

virtual Bool operator== (const LCRegion& other) const

Comparison. Mask not checked. Use function LRegionSingle::maskEqual to do this

virtual LCRegion* cloneRegion() const

Make a copy of the derived object.

static String className()

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

virtual String type() const

Get the region type. Returns className()

virtual TableRecord toRecord (const String& tableName) const

Convert the (derived) object to a record.

static LCBox* fromRecord (const TableRecord&, const String& tablename)

Convert correct object from a record.

Vector<Float> blc() const

Get the box blc

Vector<Float> trc() const

Get the box trc

static Bool verify (IPosition& blc, IPosition& trc, IPosition& inc, const IPosition& shape)

Verify a box specification. Illegal (inlcuding blc > trc) or unspecified values are given 0 (blc) shape (trc) or unity (inc). Returns True if any of the blc/trc/inc are changed from their input values, else returns False

virtual LCRegion* doTranslate (const Vector<Float>& translateVector, const IPosition& newLatticeShape) const

Construct another LCBox (for e.g. another lattice) by moving this one. It recalculates the bounding box. A positive translation value indicates "to right".

void setSlicerBox (const IPosition& blc, const IPosition& trc)

Make a box from the blc,trc such that it does not exceed the lattice boundaries.

void fillBlcTrc()

Fill the blc and trc vector from IPositions.