26#ifndef LATTICES_LCPOLYGON_H
27#define LATTICES_LCPOLYGON_H
30#include <casacore/casa/aips.h>
31#include <casacore/lattices/LRegions/LCRegionFixed.h>
32#include <casacore/casa/Arrays/Vector.h>
33#include <casacore/casa/Arrays/ArrayFwd.h>
153 const IPosition& newLatticeShape)
const override;
Int truncateStart(Float v)
Truncate a start value to a pixel point.
Int truncateEnd(Float v, Int maxEnd)
Truncate an end value to a pixel point.
LCPolygon(const Vector< Float > &x, const Vector< Float > &y, const IPosition &latticeShape)
Construct from the given x and y values.
LCPolygon(const Vector< Double > &x, const Vector< Double > &y, const IPosition &latticeShape)
LCPolygon & operator=(const LCPolygon &other)
Assignment (copy semantics).
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.
LCRegion * doTranslate(const Vector< Float > &translateVector, const IPosition &newLatticeShape) const override
Construct another LCPolygon (for e.g.
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...
void defineMask()
Define the mask to indicate which elements are inside the polygon.
static String className()
Get the class name (to store in the record).
void defineBox()
Make the bounding box.
const Vector< Float > & x() const
Get the X-values.
Bool equals(const LCRegion &other) const override
Comparison.
TableRecord toRecord(const String &tableName) const override
Convert the (derived) object to a record.
LCRegion * cloneRegion() const override
Make a copy of the derived object.
const Vector< Float > & y() const
Get the Y-values.
String type() const override
Get the region type.
static LCPolygon * fromRecord(const TableRecord &, const String &tablename)
Convert correct object from a record.
LCPolygon(const LCPolygon &other)
Copy constructor (reference semantics).
const IPosition & latticeShape() const
Give the full lattice shape.
String: the storage and methods of handling collections of characters.
For temporary backward namespace compatibility, use casa as alias for casacore.
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
bool Bool
Define the standard types used by Casacore.