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