#include <ImageRegion.h>
Inheritance diagram for casa::ImageRegion:


Part of API
The only purpose of ImageRegion is to have a single object for the various kinds of regions. It can hold a LCRegion , LCSlicer , and WCRegion .
It was felt that making an abstract base class LatticeRegion for LCRegion and WCRegion would create undesirable dependencies of module Lattices on module Coordinates. E.g. it would be impossible to have a function toWCRegion. Therefore the container class ImageRegion is chosen.
Definition at line 85 of file ImageRegion.h.
Public Member Functions | |
| ImageRegion () | |
| Default constructor (has no region at all). | |
| ImageRegion (const LCRegion &) | |
| Construct from a region based on lattice coordinates. | |
| ImageRegion (const LCSlicer &) | |
| Construct from a slicer based on lattice coordinates. | |
| ImageRegion (const WCRegion &) | |
| Construct from a region based on world coordinates. | |
| ImageRegion (const ImageRegion &other) | |
| Copy constructor (copy semantics). | |
| virtual | ~ImageRegion () |
| ImageRegion & | operator= (const ImageRegion &other) |
| Assignment (copy semantics). | |
| virtual ImageRegion * | clone () const |
| Clone the object. | |
| virtual Bool | operator== (const LattRegionHolder &other) const |
| Comparison. | |
| virtual Bool | isWCRegion () const |
| Test if the underlying region is an WCRegion. | |
| virtual const WCRegion * | asWCRegionPtr () const |
| Get the region as a pointer to WCRegion. | |
| LCRegion & | asMask () |
| Get the region as a writable mask. | |
| virtual LatticeRegion | toLatticeRegion (const CoordinateSystem &cSys, const IPosition &shape) const |
| Convert to a LatticeRegion using the given coordinate system (with reference pixel) and shape. | |
| LCRegion * | toLCRegion (const CoordinateSystem &cSys, const IPosition &shape) const |
| Convert to an LCRegion using the given coordinate system (with reference pixel) and shape. | |
| TableRecord | toRecord (const String &tableName) const |
| Convert the (derived) object to a record. | |
| ImageRegion (LCRegion *) | |
| Similar constructors as above, but using a pointer. | |
| ImageRegion (LCSlicer *) | |
| ImageRegion (WCRegion *) | |
| const LCRegion & | asLCRegion () const |
| Get the region as an LCSlicer or WCRegion. | |
| const LCSlicer & | asLCSlicer () const |
| const WCRegion & | asWCRegion () const |
| virtual LattRegionHolder * | makeUnion (const LattRegionHolder &other) const |
| Form a compound from this and the other region. | |
| virtual LattRegionHolder * | makeIntersection (const LattRegionHolder &other) const |
| virtual LattRegionHolder * | makeDifference (const LattRegionHolder &other) const |
| virtual LattRegionHolder * | makeComplement () const |
Static Public Member Functions | |
| static ImageRegion * | fromRecord (const TableRecord &, const String &tableName) |
| Convert correct object from a record. | |
Private Attributes | |
| WCRegion * | itsWC |
| casa::ImageRegion::ImageRegion | ( | ) |
Default constructor (has no region at all).
| casa::ImageRegion::ImageRegion | ( | const LCRegion & | ) |
Construct from a region based on lattice coordinates.
| casa::ImageRegion::ImageRegion | ( | const LCSlicer & | ) |
Construct from a slicer based on lattice coordinates.
| casa::ImageRegion::ImageRegion | ( | const WCRegion & | ) |
Construct from a region based on world coordinates.
| casa::ImageRegion::ImageRegion | ( | LCRegion * | ) | [explicit] |
Similar constructors as above, but using a pointer.
It takes over the pointer, so the user should not delete the object. It is deleted by the ImageRegion destructor.
| casa::ImageRegion::ImageRegion | ( | LCSlicer * | ) | [explicit] |
| casa::ImageRegion::ImageRegion | ( | WCRegion * | ) | [explicit] |
| casa::ImageRegion::ImageRegion | ( | const ImageRegion & | other | ) |
Copy constructor (copy semantics).
| virtual casa::ImageRegion::~ImageRegion | ( | ) | [virtual] |
| ImageRegion& casa::ImageRegion::operator= | ( | const ImageRegion & | other | ) |
Assignment (copy semantics).
| virtual ImageRegion* casa::ImageRegion::clone | ( | ) | const [virtual] |
| virtual Bool casa::ImageRegion::operator== | ( | const LattRegionHolder & | other | ) | const [virtual] |
| virtual Bool casa::ImageRegion::isWCRegion | ( | ) | const [virtual] |
| virtual const WCRegion* casa::ImageRegion::asWCRegionPtr | ( | ) | const [virtual] |
Get the region as a pointer to WCRegion.
An exception is thrown if the region is not the correct type. Functions isWCRegion() can be used to test the type.
Reimplemented from casa::LattRegionHolder.
Referenced by asWCRegion().
| const LCRegion & casa::ImageRegion::asLCRegion | ( | ) | const [inline] |
Get the region as an LCSlicer or WCRegion.
An exception is thrown if the region is not the correct type. Functions isWCRegion(), etc. can be used to test the type.
Definition at line 183 of file ImageRegion.h.
References casa::LattRegionHolder::asLCRegionPtr().
| const LCSlicer & casa::ImageRegion::asLCSlicer | ( | ) | const [inline] |
| const WCRegion & casa::ImageRegion::asWCRegion | ( | ) | const [inline] |
| LCRegion& casa::ImageRegion::asMask | ( | ) |
Get the region as a writable mask.
It throws an exception if the region is not an LCRegion or if its mask is not writable.
| virtual LatticeRegion casa::ImageRegion::toLatticeRegion | ( | const CoordinateSystem & | cSys, | |
| const IPosition & | shape | |||
| ) | const [virtual] |
Convert to a LatticeRegion using the given coordinate system (with reference pixel) and shape.
It will also make the region complete (absolute and non-fractional).
Reimplemented from casa::LattRegionHolder.
| LCRegion* casa::ImageRegion::toLCRegion | ( | const CoordinateSystem & | cSys, | |
| const IPosition & | shape | |||
| ) | const |
| TableRecord casa::ImageRegion::toRecord | ( | const String & | tableName | ) | const |
Convert the (derived) object to a record.
The record can be used to make the object persistent.
| static ImageRegion* casa::ImageRegion::fromRecord | ( | const TableRecord & | , | |
| const String & | tableName | |||
| ) | [static] |
Convert correct object from a record.
| virtual LattRegionHolder* casa::ImageRegion::makeUnion | ( | const LattRegionHolder & | other | ) | const [virtual] |
| virtual LattRegionHolder* casa::ImageRegion::makeIntersection | ( | const LattRegionHolder & | other | ) | const [virtual] |
Reimplemented from casa::LattRegionHolder.
| virtual LattRegionHolder* casa::ImageRegion::makeDifference | ( | const LattRegionHolder & | other | ) | const [virtual] |
Reimplemented from casa::LattRegionHolder.
| virtual LattRegionHolder* casa::ImageRegion::makeComplement | ( | ) | const [virtual] |
Reimplemented from casa::LattRegionHolder.
WCRegion* casa::ImageRegion::itsWC [private] |
Definition at line 179 of file ImageRegion.h.
1.5.1