casacore::LCBox Class Reference

Class to define a rectangular box of interest. More...

#include <LCBox.h>

Inheritance diagram for casacore::LCBox:
casacore::LCRegionFixed casacore::LCRegionSingle casacore::LCRegion casacore::Lattice< Bool > casacore::LatticeBase

List of all members.

Public Member Functions

 LCBox ()
 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.
 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)
 Construct from the Vector's defining the bottom-left and top-right corner of the box.
 LCBox (const Vector< Double > &blc, const Vector< Double > &trc, const IPosition &latticeShape)
 LCBox (const LCBox &other)
 Copy constructor (reference semantics).
virtual ~LCBox ()
LCBoxoperator= (const LCBox &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.
Vector< Floatblc () const
 Get the box blc.
Vector< Floattrc () const
 Get the box trc.

Static Public Member Functions

static String className ()
 Get the class name (to store in the record).
static LCBoxfromRecord (const TableRecord &, const String &tablename)
 Convert correct object from a record.
static Bool verify (IPosition &blc, IPosition &trc, IPosition &inc, const IPosition &shape)
 Verify a box specification.

Protected Member Functions

virtual LCRegiondoTranslate (const Vector< Float > &translateVector, const IPosition &newLatticeShape) const
 Construct another LCBox (for e.g.

Private Member Functions

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.

Private Attributes

Vector< FloatitsBlc
Vector< FloatitsTrc

Detailed Description

Class to define a rectangular box of interest.

Intended use:

Public interface

Prerequisite

Synopsis

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

Example

Definition at line 67 of file LCBox.h.


Constructor & Destructor Documentation

casacore::LCBox::LCBox (  ) 
casacore::LCBox::LCBox ( const IPosition latticeShape  )  [explicit]

Construct a box for the full lattice shape.

casacore::LCBox::LCBox ( const Slicer box,
const IPosition latticeShape 
)

Construct from the Slicer defining the box.

The slicer may not contain a stride.

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

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

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

casacore::LCBox::LCBox ( const Vector< Double > &  blc,
const Vector< Double > &  trc,
const IPosition latticeShape 
)
casacore::LCBox::LCBox ( const LCBox other  ) 

Copy constructor (reference semantics).

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

Member Function Documentation

Vector< Float > casacore::LCBox::blc (  )  const [inline]

Get the box blc.

Definition at line 157 of file LCBox.h.

References itsBlc.

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

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

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

Make a copy of the derived object.

Implements casacore::LCRegion.

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

Construct another LCBox (for e.g.

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

Implements casacore::LCRegion.

void casacore::LCBox::fillBlcTrc (  )  [private]

Fill the blc and trc vector from IPositions.

static LCBox* casacore::LCBox::fromRecord ( const TableRecord ,
const String tablename 
) [static]

Convert correct object from a record.

Reimplemented from casacore::LCRegion.

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

Assignment (copy semantics).

Reimplemented from casacore::LCRegionFixed.

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

Comparison.

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

Reimplemented from casacore::LCRegionFixed.

void casacore::LCBox::setSlicerBox ( const IPosition blc,
const IPosition trc 
) [private]

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

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

Convert the (derived) object to a record.

Implements casacore::LCRegion.

Vector< Float > casacore::LCBox::trc (  )  const [inline]

Get the box trc.

Definition at line 161 of file LCBox.h.

References itsTrc.

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

Get the region type.

Returns className()

Implements casacore::LCRegion.

static Bool casacore::LCBox::verify ( IPosition blc,
IPosition trc,
IPosition inc,
const IPosition shape 
) [static]

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


Member Data Documentation

Definition at line 152 of file LCBox.h.

Referenced by blc().

Definition at line 153 of file LCBox.h.

Referenced by trc().


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