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));
String: the storage and methods of handling collections of characters.
virtual WCRegion * cloneRegion() const =0
Clone a WCRegion object.
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.
const Record & getAxisDesc(uInt axis) const
Get the description of the given axis.
Bool isAxisDescEqual(const Record &desc1, const Record &desc2) const
Are both axis descriptions equal?
const String & comment() const
Get or set the comment.
static WCRegion * fromRecord(const TableRecord &rec, const String &tableName)
Convert correct object from a record.
virtual TableRecord toRecord(const String &tableName) const =0
Convert the (derived) object to a record.
WCRegion(const WCRegion &other)
Copy constructor (copy semantics).
Int axisNr(const Record &desc, const Record &axesDesc) const
Return the axis number of the description of an axis in the full axes description.
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.
WCRegion & operator=(const WCRegion &other)
Assignment (copy semantics) makes only sense for a derived class.
static void convertPixel(Double &pixel, const Double &value, const String &unit, const Int absRel, const Double refPix, const Int shape)
void setComment(const String &comment)
Record makeAxesDesc(const CoordinateSystem &cSys) const
Make a description of all pixel axes in the coordinate system (in pixel axes order).
virtual Bool operator==(const WCRegion &other) const
Comparison.
virtual String type() const =0
Return region type.
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.
virtual ~WCRegion()
Destructor.
void addAxisDesc(const Record &axisDesc)
Add an axis with its description.
Record makeAxisDesc(const CoordinateSystem &cSys, uInt pixelAxis) const
Make a description of a pixel axis in the coordinate system.
virtual LCRegion * toLCRegion(const CoordinateSystem &cSys, const IPosition &shape) const
Convert to an LCRegion using the given new coordinate system and shape.
Bool operator!=(const WCRegion &other) const
virtual Bool canExtend() const
Can the region extend itself? By default it cannot.
void makeWorldAbsolute(Vector< Double > &world, const Vector< Int > &absRel, const CoordinateSystem &cSys, const IPosition &shape) const
Convert relative to absolute world as needed.
virtual uInt ndim() const
Get the dimensionality (i.e.
void checkAxes(const IPosition &pixelAxes, const CoordinateSystem &cSys, const Vector< String > &quantityUnits) const
this file contains all the compiler specific defines
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
bool Bool
Define the standard types used by Casacore.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.