Go to the documentation of this file.
28 #ifndef IMAGES_WCREGION_H
29 #define IMAGES_WCREGION_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Containers/Record.h>
34 #include <casacore/coordinates/Coordinates/CoordinateSystem.h>
35 #include <casacore/tables/Tables/TableRecord.h>
41 class RecordInterface;
191 const String& className)
const;
250 return (!
operator==(other));
virtual Bool operator==(const WCRegion &other) const
Comparison.
virtual TableRecord toRecord(const String &tableName) const =0
Convert the (derived) object to a record.
virtual String type() const =0
Return region type.
virtual LCRegion * toLCRegion(const CoordinateSystem &cSys, const IPosition &shape) const
Convert to an LCRegion using the given new coordinate system and shape.
Record makeAxisDesc(const CoordinateSystem &cSys, uInt pixelAxis) const
Make a description of a pixel axis in the coordinate system.
const Record & getAxesDesc() const
Get the description of all axes.
void defineRecordFields(RecordInterface &record, const String &className) const
Define the type and class name in the record.
const Record & getAxisDesc(uInt axis) const
Get the description of the given axis.
LCRegion * toLCRegionAxes(const CoordinateSystem &cSys, const IPosition &shape, const IPosition &pixelAxesMap, const IPosition &outOrder) const
Convert to an LCRegion using the given coordinate system and shape.
static WCRegion * fromRecord(const TableRecord &rec, const String &tableName)
Convert correct object from a record.
WCRegion & operator=(const WCRegion &other)
Assignment (copy semantics) makes only sense for a derived class.
Record makeAxesDesc(const CoordinateSystem &cSys) const
Make a description of all pixel axes in the coordinate system (in pixel axes order).
virtual WCRegion * cloneRegion() const =0
Clone a WCRegion object.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual uInt ndim() const
Get the dimensionality (i.e.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
Bool isAxisDescEqual(const Record &desc1, const Record &desc2) const
Are both axis descriptions equal?
const String & comment() const
Get or set the comment.
Int axisNr(const Record &desc, const Record &axesDesc) const
Return the axis number of the description of an axis in the full axes description.
WCRegion(const WCRegion &other)
Copy constructor (copy semantics).
this file contains all the compiler specific defines
void makeWorldAbsolute(Vector< Double > &world, const Vector< Int > &absRel, const CoordinateSystem &cSys, const IPosition &shape) const
Convert relative to absolute world as needed.
virtual ~WCRegion()
Destructor.
void setComment(const String &comment)
static void convertPixel(Double &pixel, const Double &value, const String &unit, const Int absRel, const Double refPix, const Int shape)
virtual LCRegion * doToLCRegion(const CoordinateSystem &cSys, const IPosition &shape, const IPosition &pixelAxesMap, const IPosition &extendAxes) const =0
Convert to an LCRegion using the given coordinate system and shape.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
virtual Bool canExtend() const
Can the region extend itself? By default it cannot.
void checkAxes(const IPosition &pixelAxes, const CoordinateSystem &cSys, const Vector< String > &quantityUnits) const
Bool operator!=(const WCRegion &other) const
void addAxisDesc(const Record &axisDesc)
Add an axis with its description.