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));
virtual void apply(const Functional< Bool, Bool > &function)
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).
void setComment(const String &comment)
LCRegion(const IPosition &latticeShape)
Construct with the lattice shape only.
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)
IPosition expand(const IPosition &index) const
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.
LCRegion * translate(const IPosition &translateVector, const IPosition &newLatticeShape) const
const String & comment() const
Get or set the comment.
this file contains all the compiler specific defines
virtual void apply(Bool(*function)(const Bool &))
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.
LCRegion * translate(const Vector< Float > &translateVector, const IPosition &newLatticeShape) const
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.
LCRegion(const LCRegion &other)
Copy constructor (copy semantics).
virtual LCRegion * doTranslate(const Vector< Float > &translateVector, const IPosition &newLatticeShape) const =0
Do the actual translate in a derived class.