Go to the documentation of this file.
28 #ifndef LATTICES_LCPOLYGON_H
29 #define LATTICES_LCPOLYGON_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/lattices/LRegions/LCRegionFixed.h>
34 #include <casacore/casa/Arrays/Vector.h>
39 template<
class T>
class Matrix;
void fillMask(Bool *mask, Int nx, Int ny, Int blcx, Int blcy, const Float *ptrX, const Float *ptrY, uInt nrline)
Fill the mask from the given points.
LCPolygon(const Vector< Float > &x, const Vector< Float > &y, const IPosition &latticeShape)
Construct from the given x and y values.
Int truncateEnd(Float v, Int maxEnd)
Truncate an end value to a pixel point.
Int truncateStart(Float v)
Truncate a start value to a pixel point.
virtual LCRegion * cloneRegion() const
Make a copy of the derived object.
static String className()
Get the class name (to store in the record).
LCPolygon(const Vector< Double > &x, const Vector< Double > &y, const IPosition &latticeShape)
virtual String type() const
Get the region type.
virtual LCRegion * doTranslate(const Vector< Float > &translateVector, const IPosition &newLatticeShape) const
Construct another LCPolygon (for e.g.
void defineBox()
Make the bounding box.
virtual Bool operator==(const LCRegion &other) const
Comparison.
LCPolygon & operator=(const LCPolygon &other)
Assignment (copy semantics).
this file contains all the compiler specific defines
const IPosition & latticeShape() const
Give the full lattice shape.
LCPolygon(const LCPolygon &other)
Copy constructor (reference semantics).
const Vector< Float > & y() const
Get the Y-values.
const Vector< Float > & x() const
Get the X-values.
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
virtual TableRecord toRecord(const String &tableName) const
Convert the (derived) object to a record.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
void defineMask()
Define the mask to indicate which elements are inside the polygon.
static LCPolygon * fromRecord(const TableRecord &, const String &tablename)
Convert correct object from a record.
static Bool _isNear(Float val1, Float val2)
takes into account when one value is zero and the other is absolutely (as opposed to relatively) near...