28 #ifndef LATTICES_LCREGION_H
29 #define LATTICES_LCREGION_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().
virtual Bool isWritable() const
Usually the lattice (i.e.
virtual LCRegion * cloneRegion() const =0
virtual void handleDelete()
Handle deletion of the region by deleting possible tables.
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.
void defineRecordFields(RecordInterface &record, const String &className) const
Define the type and class name in the record.
virtual uInt ndim() const
Return the dimensionality of the region.
virtual TableRecord toRecord(const String &tableName) const =0
Convert the (derived) object to a record.
void setComment(const String &comment)
virtual Lattice< Bool > * clone() const
Make a copy of the derived object.
virtual void putAt(const Bool &value, const IPosition &where)
Put the value of a single element.
LCRegion * translate(const IPosition &translateVector) const
Construct another LCRegion (for e.g.
A templated, abstract base class for array-like objects.
virtual Bool operator==(const LCRegion &other) const
Equality.
LCRegion & operator=(const LCRegion &other)
Assignment (copy semantics) is only useful for derived classes.
const IPosition & latticeShape() const
Give the full lattice shape.
bool Bool
Define the standard types used by Casacore.
virtual IPosition shape() const
Return the shape of the region (i.e.
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.
const Slicer & boundingBox() const
Give the bounding box.
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.
virtual LCRegion * doTranslate(const Vector< Float > &translateVector, const IPosition &newLatticeShape) const =0
Do the actual translate in a derived class.
Slicer expand(const Slicer &slicer) const
Expand a slicer or position in the region to the full lattice.
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.
const String & comment() const
Get or set the comment.
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.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
Abstract base class to define a region of interest in lattice coordinates.
Bool operator!=(const LCRegion &other) const
Non-equality.
virtual void set(const Bool &value)
Set all elements in the Lattice to the given value.