Go to the documentation of this file.
29 #ifndef LATTICES_SUBLATTICE_H
30 #define LATTICES_SUBLATTICE_H
34 #include <casacore/casa/aips.h>
35 #include <casacore/lattices/Lattices/MaskedLattice.h>
36 #include <casacore/lattices/LRegions/LatticeRegion.h>
37 #include <casacore/casa/Arrays/AxesSpecifier.h>
38 #include <casacore/casa/Arrays/AxesMapping.h>
313 Bool writableIfPossible);
348 #ifndef CASACORE_NO_AUTO_TEMPLATES
349 #include <casacore/lattices/Lattices/SubLattice.tcc>
350 #endif //# CASACORE_NO_AUTO_TEMPLATES
IPosition positionInParent(const IPosition &subLatticePosition) const
Convert the specified position in the sublattice to the corresponding position in the parent lattice.
virtual void reopen()
If needed, reopen a temporarily closed Lattice.
virtual void tempClose()
Close the Lattice temporarily (if it is paged to disk).
virtual Bool canReferenceArray() const
Can the lattice data be referenced as an array section?
SubLattice(const MaskedLattice< T > &lattice, const Slicer &slicer, AxesSpecifier=AxesSpecifier())
void setPtr(Lattice< T > *latticePtr, MaskedLattice< T > *maskLatPtr, Bool writableIfPossible)
Set the various pointers needed to construct the object.
SubLattice(Lattice< T > &lattice, const Slicer &slicer, Bool writableIfPossible, AxesSpecifier=AxesSpecifier())
virtual void flush()
Flush the data.
IPosition posToOld(const IPosition &pos) const
Map a new position or shape to the old one.
virtual String name(Bool stripPath=False) const
Return the name of the parent lattice.
SubLattice(const MaskedLattice< T > &lattice, AxesSpecifier=AxesSpecifier())
Create a SubLattice from a MaskedLattice.
virtual Bool isPaged() const
Is the SubLattice paged to disk?
SubLattice(const MaskedLattice< T > &lattice, const LatticeRegion ®ion, AxesSpecifier=AxesSpecifier())
LockType
Define the possible lock types.
SubLattice(Lattice< T > &lattice, Bool writableIfPossible, AxesSpecifier=AxesSpecifier())
virtual IPosition shape() const
Returns the shape of the SubLattice including all degenerate axes (i.e.
Bool getRegionDataSlice(Array< Bool > &buffer, const Slicer §ion)
Get mask data from region and mask.
Lattice< Bool > * itsPixelMask
SubLattice(MaskedLattice< T > &lattice, Bool writableIfPossible, AxesSpecifier=AxesSpecifier())
SubLattice(const SubLattice< T > &other)
Copy constructor (reference semantics).
void andMask(Array< Bool > &buffer, Bool ref, const Array< Bool > &tmpbuf) const
And tmpbuf into buffer.
virtual Bool isPersistent() const
A SubLattice is persistent if no region is applied to the parent lattice.
virtual IPosition doNiceCursorShape(uInt maxPixels) const
Get the best cursor shape.
Lattice< Bool > * itsOwnPixelMask
const AxesMapping & getAxesMap() const
Set the axes mapping from the specification.
Lattice< T > * itsLatticePtr
virtual void doPutSlice(const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride)
Do the actual getting of an array of values.
virtual Bool lock(FileLocker::LockType, uInt nattempts)
Handle locking of the SubLattice which is delegated to its parent.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
SubLattice(MaskedLattice< T > &lattice, const Slicer &slicer, Bool writableIfPossible, AxesSpecifier=AxesSpecifier())
virtual Bool hasLock(FileLocker::LockType) const
Bool getMaskDataSlice(Array< Bool > &buffer, const Slicer §ion)
virtual uInt advisedMaxPixels() const
This function returns the recommended maximum number of pixels to include in the cursor of an iterato...
virtual Bool doGetSlice(Array< T > &buffer, const Slicer §ion)
Do the actual getting of an array of values.
virtual Bool hasPixelMask() const
Does the SubLattice have a pixelmask?
SubLattice(MaskedLattice< T > &lattice, const LatticeRegion ®ion, Bool writableIfPossible, AxesSpecifier=AxesSpecifier())
void setAxesMap(const AxesSpecifier &)
Set the axes mapping from the specification.
virtual Bool doGetMaskSlice(Array< Bool > &buffer, const Slicer §ion)
Get a section of the mask.
virtual Bool isMasked() const
Is the lattice masked? It is if its parent lattice or its region is masked.
virtual Bool isWritable() const
Is the SubLattice writable?
SubLattice< T > & operator=(const SubLattice< T > &other)
Assignment (reference semantics).
this file contains all the compiler specific defines
virtual const Lattice< Bool > & pixelMask() const
Get access to the pixelmask.
Slicer convert(const Slicer &slicer) const
Convert positions to positions in the parent object.
SubLattice(const Lattice< T > &lattice, AxesSpecifier=AxesSpecifier())
Create a SubLattice from a Lattice.
virtual void putAt(const T &value, const IPosition &where)
virtual T getAt(const IPosition &where) const
Get or put a single element in the lattice.
SubLattice(const Lattice< T > &lattice, const LatticeRegion ®ion, AxesSpecifier=AxesSpecifier())
Create a SubLattice from the given MaskedLattice and region.
virtual Lattice< Bool > & pixelMask()
MaskedLattice< T > * itsMaskLatPtr
virtual Bool ok() const
Check class internals - used for debugging.
template <class T, class U> class vector;
String: the storage and methods of handling collections of characters.
void setRegion(const LatticeRegion ®ion)
Set the region object.
virtual MaskedLattice< T > * cloneML() const
Make a copy of the object (reference semantics).
AxesSpecifier itsAxesSpec
bool Bool
Define the standard types used by Casacore.
void setRegion(const Slicer &slicer)
Set the region object using a slicer.
virtual const LatticeRegion * getRegionPtr() const
Get a pointer the region/mask object describing this sublattice.
SubLattice()
The default constructor creates a SubLattice that is useless for just about everything,...
void setPixelMask(const Lattice< Bool > &pixelMask, Bool mayExist)
Use the given mask as the pixelmask.
virtual void resync()
Resynchronize the Lattice object with the lattice file.
SubLattice(const Lattice< T > &lattice, const Slicer &slicer, AxesSpecifier=AxesSpecifier())
Create a SubLattice from the given (Masked)Lattice and slicer.
virtual LatticeIterInterface< T > * makeIter(const LatticeNavigator &navigator, Bool useRef) const
This function is used by the LatticeIterator class to generate an iterator of the correct type for th...
Bool isRemoved() const
Are axes removed?
SubLattice(Lattice< T > &lattice, const LatticeRegion ®ion, Bool writableIfPossible, AxesSpecifier=AxesSpecifier())