LCRegionFixed.h

Classes

LCRegionFixed -- Abstract base class to define a fixed region. (full description)

class LCRegionFixed : public LCRegionSingle

Interface

Public Members
LCRegionFixed()
LCRegionFixed (const IPosition& latticeShape)
LCRegionFixed (const LCRegionFixed& other)
virtual ~LCRegionFixed()
virtual Bool operator== (const LCRegion& other) const
Protected Members
LCRegionFixed& operator= (const LCRegionFixed& other)
void setMask (const Array<Bool>& mask)

Description

Prerequisite

Synopsis

The LCRegion class is the abstract base class for various types of LCRegion's (e.g. LCRegionEllipsoid, LCRegionBox). It contains the minimal bounding box of the region and, if needed, a mask with the same shape as the bounding box. A mask element is true if the element is inside the box.

Each LCRegion object must be able to convert itself to and from a record. In that way they can be made persistent (in for example a Table).

The LCRegion can be used in several Lattices and Images classes and functions to limit the area to operate on.

Example


 

Motivation

The Slicer class is too limited as a region, because it can only describe a rectangular region. Specialized classes are needed to describe arbitrary regions. They need a base class to combine them.

Member Description

LCRegionFixed()

LCRegionFixed (const IPosition& latticeShape)

Construct with the lattice shape only.

LCRegionFixed (const LCRegionFixed& other)

Copy constructor (copy semantics).

virtual ~LCRegionFixed()

Destructor

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

Comparison. Mask is not checked. Use the LCRegionSingle::masksEqual function as well if you want to check the masks

LCRegionFixed& operator= (const LCRegionFixed& other)

Assignment (copy semantics) is only useful for derived classes.

void setMask (const Array<Bool>& mask)

Set the mask.