28 #ifndef IMAGES_TEMPIMAGE_H
29 #define IMAGES_TEMPIMAGE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/images/Images/ImageInterface.h>
35 #include <casacore/lattices/Lattices/TiledShape.h>
36 #include <casacore/lattices/Lattices/TempLattice.h>
111 Int maxMemoryInMB=-1);
226 virtual void apply (T (*
function)(T));
227 virtual void apply (T (*
function)(
const T&));
318 #ifndef CASACORE_NO_AUTO_TEMPLATES
319 #include <casacore/images/Images/TempImage.tcc>
GroupType
Define the possible group types (regions or masks).
String: the storage and methods of handling collections of characters.
virtual const LatticeRegion * getRegionPtr() const
Get the region used (it always returns 0).
virtual void removeRegion(const String &name, RegionHandler::GroupType=RegionHandler::Any, Bool throwIfUnknown=True)
Remove a region/mask belonging to the image from the given group (which can be Any).
virtual void flush()
Flush the data.
virtual void setMaximumCacheSize(uInt howManyPixels)
Set the maximum (allowed) cache size as indicated.
virtual String imageType() const
Get the image type (returns name of derived class).
TempImage()
The default constructor creates an empty image.
virtual void set(const T &value)
Function which sets all of the elements in the Lattice to a value.
TempLattice< T > * mapPtr_p
virtual Bool doGetSlice(Array< T > &buffer, const Slicer &theSlice)
Function which extracts an array from the map.
virtual T getAt(const IPosition &where) const
Get or put a single pixel.
virtual void reopen()
If needed, reopen a temporarily closed TempLattice.
void removeMask()
Delete the pixel mask attached to the TempImage.
virtual void attachMask(const Lattice< Bool > &mask)
Attach a mask to the TempImage.
virtual LatticeIterInterface< T > * makeIter(const LatticeNavigator &navigator, Bool useRef) const
This is the implementations of the letters for the envelope Iterator class Note: Not for public use
virtual void setCacheSizeFromPath(const IPosition &sliceShape, const IPosition &windowStart, const IPosition &windowLength, const IPosition &axisPath)
Set the cache size as to "fit" the indicated path.
virtual void doPutSlice(const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride)
Function to replace the values in the map with soureBuffer.
void applyMaskSpecifier(const MaskSpecifier &)
virtual Bool canReferenceArray() const
Can the lattice data be referenced as an array section?
virtual uInt advisedMaxPixels() const
Returns the maximum recommended number of pixels for a cursor.
virtual void useMask(MaskSpecifier=MaskSpecifier())
Use the mask as specified.
virtual void putAt(const T &value, const IPosition &where)
Put the value of a single element.
virtual Bool doGetMaskSlice(Array< Bool > &buffer, const Slicer §ion)
Get a section of the mask.
virtual uInt maximumCacheSize() const
Maximum size - not necessarily all used.
virtual const Lattice< Bool > & pixelMask() const
Get access to the pixelmask used.
TempImage(const TempImage< T > &other)
Copy constructor (reference semantics).
virtual void apply(const Functional< T, T > &function)
virtual void apply(T(*function)(const T &))
virtual Bool isMasked() const
It a mask attached to the image?
virtual void setCacheSizeInTiles(uInt howManyTiles)
Set the actual cache size for this Array to be be big enough for the indicated number of tiles.
virtual Lattice< Bool > & pixelMask()
virtual Bool isWritable() const
Is the TempImage writable?
virtual void clearCache()
Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSiz...
virtual void apply(T(*function)(T))
Replace every element, x, of the lattice with the result of f(x).
virtual Bool ok() const
Check for symmetry in data members.
virtual Bool hasPixelMask() const
Does the image object use a pixelmask? This is similar to isMasked().
virtual String name(Bool stripPath=False) const
Return the name of the current TempImage object.
virtual IPosition shape() const
Return the shape of the image.
virtual void showCacheStatistics(ostream &os) const
Report on cache success.
TempImage(const TiledShape &mapShape, const CoordinateSystem &coordinateInfo, Double maxMemoryInMB)
Lattice< Bool > * maskPtr_p
virtual void resize(const TiledShape &newShape)
Function which changes the shape of the image (N.B.
virtual ImageInterface< T > * cloneII() const
Make a copy of the object (reference semantics).
virtual IPosition doNiceCursorShape(uInt maxPixels) const
Help the user pick a cursor for most efficient access.
virtual Bool isPaged() const
Is the TempImage paged to disk?
TempImage(const TiledShape &mapShape, const CoordinateSystem &coordinateInfo, Int maxMemoryInMB=-1)
Construct a temporary Image from shape and coordinate information.
virtual void tempClose()
Close the TempImage temporarily (if it is paged to disk).
TempImage< T > & operator=(const TempImage< T > &other)
Assignment operator (reference semantics).
void applyMask(const String &maskName)
virtual void setDefaultMask(const String &maskName)
Set the default pixelmask to the mask with the given name (which has to exist in the "masks" group).
this file contains all the compiler specific defines
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
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.