28 #ifndef IMAGES_SUBIMAGE_H
29 #define IMAGES_SUBIMAGE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Arrays/ArrayFwd.h>
35 #include <casacore/images/Images/ImageInterface.h>
36 #include <casacore/casa/Arrays/AxesSpecifier.h>
42 class LattRegionHolder;
44 template <
class T>
class SubLattice;
45 class LatticeNavigator;
46 template <
class T>
class LatticeIterInterface;
117 Bool writableIfPossible,
128 Bool writableIfPossible,
289 #ifndef CASACORE_NO_AUTO_TEMPLATES
290 #include <casacore/images/Images/SubImage.tcc>
LockType
Define the possible lock types.
const LatticeRegion & region() const
Get the region used.
String: the storage and methods of handling collections of characters.
SubImage(const ImageInterface< T > &image, const Slicer &slicer, AxesSpecifier=AxesSpecifier(), Bool preserveAxesOrder=False)
Create a SubImage from the given Image and slicer.
virtual Bool doGetMaskSlice(Array< Bool > &buffer, const Slicer §ion)
Get a section of the mask.
void setMembers()
Set the other members to the one in itsImagePtr.
void convertIPosition(Vector< Float > &x, const IPosition &pos) const
Helper.
SubImage(ImageInterface< T > &image, const LattRegionHolder ®ion, Bool writableIfPossible, AxesSpecifier=AxesSpecifier(), Bool preserveAxesOrder=False)
SubImage(ImageInterface< T > &image, const Slicer &slicer, Bool writableIfPossible, AxesSpecifier=AxesSpecifier(), Bool preserveAxesOrder=False)
SubImage()
The default constructor.
virtual Lattice< Bool > & pixelMask()
virtual IPosition doNiceCursorShape(uInt maxPixels) const
Get the best cursor shape.
SubImage(const ImageInterface< T > &image, const LattRegionHolder ®ion, AxesSpecifier=AxesSpecifier(), Bool preserveAxesOrder=False)
Create a SubImage from the given Image and region.
virtual const LatticeRegion * getRegionPtr() const
Get the region/mask object describing this subImage.
virtual Bool isPaged() const
Is the SubImage paged to disk?
virtual Bool isPersistent() const
A SubImage is persistent if no region is applied to the parent image.
SubImage< T > & operator=(const SubImage< T > &other)
Assignment (reference semantics).
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...
virtual Bool hasLock(FileLocker::LockType) const
virtual const Lattice< Bool > & pixelMask() const
Get access to the pixelmask in use (thus to the pixelmask of the parent).
virtual void doPutSlice(const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride)
Do the actual getting of an array of values.
virtual void resize(const TiledShape &newShape)
Function which changes the shape of the SubImage.
virtual void putAt(const T &value, const IPosition &where)
Put the value of a single element.
virtual ImageAttrHandler & attrHandler(Bool createHandler=False)
Get access to the attribute handler (of the parent image).
virtual Bool hasPixelMask() const
Does the image object have a pixelmask? It does if its parent has a pixelmask.
virtual size_t nelements() const
Returns the total number of elements in this SubImage.
virtual Bool canReferenceArray() const
Can the lattice data be referenced as an array section?
void setCoords(const CoordinateSystem &coords, Bool preserveAxesOrder)
Set the coordinates.
SubLattice< T > * itsSubLatPtr
virtual uInt ndim() const
Returns the number of axes in this SubImage.
SubImage(const ImageInterface< T > &image, AxesSpecifier=AxesSpecifier(), Bool preserveAxesOrder=False)
Create a SubImage from a Image.
virtual void resync()
Resynchronize the Lattice object with the lattice file.
virtual String imageType() const
Get the image type (returns name of derived class).
virtual Bool isWritable() const
Is the SubImage writable?
SubImage(const SubImage< T > &other)
Copy constructor (reference semantics).
virtual void tempClose()
Temporarily close the lattice.
ImageInterface< T > * itsImagePtr
virtual String name(Bool stripPath=False) const
Return the name of the parent ImageInterface object.
void setMembers(const Slicer &slicer)
Set the members to the subset (in particular, the beamset).
virtual T getAt(const IPosition &where) const
Get or put a single element in the lattice.
virtual Bool conform(const Lattice< T > &other) const
returns a value of "True" if this instance of Lattice and 'other' have the same shape,...
virtual Bool isMasked() const
Is the SubImage masked? It is if its parent image or its region is masked.
virtual Bool lock(FileLocker::LockType, uInt nattempts)
Handle the (un)locking and syncing, etc.
void setCoords(const CoordinateSystem &coords)
virtual Bool doGetSlice(Array< T > &buffer, const Slicer §ion)
Do the actual getting of an array of values.
SubImage(ImageInterface< T > &image, Bool writableIfPossible, AxesSpecifier=AxesSpecifier(), Bool preserveAxesOrder=False)
virtual void reopen()
Explicitly reopen the temporarily closed lattice.
virtual void flush()
Flush the data (but do not unlock).
virtual IPosition shape() const
Returns the shape of the SubImage including all degenerate axes (i.e.
virtual uInt advisedMaxPixels() const
This function returns the recommended maximum number of pixels to include in the cursor of an iterato...
virtual Bool ok() const
Check class invariants.
virtual ImageInterface< T > * cloneII() const
Make a copy of the object (reference semantics).
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.