28 #ifndef LATTICES_LCREGION_H 29 #define LATTICES_LCREGION_H 32 #include <casacore/casa/aips.h> 33 #include <casacore/lattices/Lattices/Lattice.h> 34 #include <casacore/casa/Arrays/IPosition.h> 35 #include <casacore/casa/Arrays/Slicer.h> 41 class RecordInterface;
209 const Slicer& boundingBox);
214 const IPosition& newLatticeShape)
const = 0;
218 const String& className)
const;
263 return (!
operator==(other));
A Vector of integers, for indexing into Array<T> objects.
virtual Bool hasMask() const =0
Does the region have a mask?
Map a domain object into a range object via operator().
void defineRecordFields(RecordInterface &record, const String &className) const
Define the type and class name in the record.
virtual LCRegion * cloneRegion() const =0
virtual Bool operator==(const LCRegion &other) const
Equality.
virtual void handleDelete()
Handle deletion of the region by deleting possible tables.
virtual Lattice< Bool > * clone() const
Make a copy of the derived object.
void setShapeAndBoundingBox(const IPosition &latticeShape, const Slicer &boundingBox)
virtual void copyData(const Lattice< Bool > &from)
Copy the data from the given lattice to this one.
virtual TableRecord toRecord(const String &tableName) const =0
Convert the (derived) object to a record.
virtual Bool isWritable() const
Usually the lattice (i.e.
void setComment(const String &comment)
virtual IPosition shape() const
Return the shape of the region (i.e.
virtual void putAt(const Bool &value, const IPosition &where)
Put the value of a single element.
A templated, abstract base class for array-like objects.
const IPosition & latticeShape() const
Give the full lattice shape.
const String & comment() const
Get or set the comment.
LCRegion & operator=(const LCRegion &other)
Assignment (copy semantics) is only useful for derived classes.
bool Bool
Define the standard types used by Casacore.
virtual void handleRename(const String &newName, Bool overwrite)
Handle renaming the region by renaming possible tables.
A hierarchical collection of named fields of various types.
virtual void doPutSlice(const Array< Bool > &sourceBuffer, const IPosition &where, const IPosition &stride)
Regions can usually not be put; i.e.
Specify which elements to extract from an n-dimensional array.
void setBoundingBox(const Slicer &boundingBox)
Sometimes it is inconvenient for a derived class to set the bounding box in the constructor.
LCRegion * translate(const IPosition &translateVector) const
Construct another LCRegion (for e.g.
const Slicer & boundingBox() const
Give the bounding box.
virtual LCRegion * doTranslate(const Vector< Float > &translateVector, const IPosition &newLatticeShape) const =0
Do the actual translate in a derived class.
String: the storage and methods of handling collections of characters.
static LCRegion * fromRecord(const TableRecord &, const String &tableName)
Convert correct object from a record.
Abstract base class for Record classes.
Slicer expand(const Slicer &slicer) const
Expand a slicer or position in the region to the full lattice.
virtual void apply(Bool(*function)(Bool))
Replace every element, x, of the Lattice with the result of f(x).
virtual String type() const =0
Region type.
this file contains all the compiler specific defines
virtual uInt ndim() const
Return the dimensionality of the region.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
Bool operator!=(const LCRegion &other) const
Non-equality.
Abstract base class to define a region of interest in lattice coordinates.