28 #ifndef IMAGES_TEMPIMAGE_H
29 #define IMAGES_TEMPIMAGE_H
97 template<
class T>
class TempImage:
public ImageInterface<T>
110 const CoordinateSystem& coordinateInfo,
111 Int maxMemoryInMB=-1);
114 const CoordinateSystem& coordinateInfo,
124 TempImage<T>&
operator= (
const TempImage<T>& other);
127 virtual ImageInterface<T>*
cloneII()
const;
190 virtual void flush();
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>
320 #endif //# CASACORE_NO_AUTO_TEMPLATES
A Vector of integers, for indexing into Array<T> objects.
virtual T getAt(const IPosition &where) const
Get or put a single pixel.
A Lattice that can be used for temporary storage.
void removeMask()
Delete the pixel mask attached to the TempImage.
virtual void showCacheStatistics(ostream &os) const
Report on cache success.
void applyMaskSpecifier(const MaskSpecifier &)
Temporary astronomical images.
virtual uInt advisedMaxPixels() const
Returns the maximum recommended number of pixels for a cursor.
virtual Bool ok() const
Check for symmetry in data members.
virtual Bool isPaged() const
Is the TempImage paged to disk?
Map a domain object into a range object via operator().
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
virtual Bool doGetSlice(Array< T > &buffer, const Slicer &theSlice)
Function which extracts an array from the map.
TempLattice< T > * mapPtr_p
virtual String name(Bool stripPath=False) const
Return the name of the current TempImage object.
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 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 ImageInterface< T > * cloneII() const
Make a copy of the object (reference semantics).
virtual void putAt(const T &value, const IPosition &where)
Put the value of a single element.
virtual const LatticeRegion * getRegionPtr() const
Get the region used (it always returns 0).
virtual IPosition doNiceCursorShape(uInt maxPixels) const
Help the user pick a cursor for most efficient access.
A base class for Lattice iterators.
void applyMask(const String &maskName)
Define the shape and tile shape.
A base class for astronomical images.
Class to specify which mask to use in an image.
virtual const Lattice< Bool > & pixelMask() const
Get access to the pixelmask used.
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 ...
Lattice< Bool > * maskPtr_p
virtual uInt maximumCacheSize() const
Maximum size - not necessarily all used.
virtual Bool isMasked() const
It a mask attached to the image?
virtual Bool doGetMaskSlice(Array< Bool > &buffer, const Slicer §ion)
Get a section of the mask.
virtual void useMask(MaskSpecifier=MaskSpecifier())
Use the mask as specified.
virtual Bool canReferenceArray() const
Can the lattice data be referenced as an array section?
bool Bool
Define the standard types used by Casacore.
TempImage< T > & operator=(const TempImage< T > &other)
Assignment operator (reference semantics).
virtual void reopen()
If needed, reopen a temporarily closed TempLattice.
virtual void set(const T &value)
Function which sets all of the elements in the Lattice to a value.
virtual void doPutSlice(const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride)
Function to replace the values in the map with soureBuffer.
virtual void attachMask(const Lattice< Bool > &mask)
Attach a mask to the TempImage.
Specify which elements to extract from an n-dimensional array.
virtual void tempClose()
Close the TempImage temporarily (if it is paged to disk).
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 resize(const TiledShape &newShape)
Function which changes the shape of the image (N.B.
virtual IPosition shape() const
Return the shape of the image.
String: the storage and methods of handling collections of characters.
An optionally strided region in a Lattice.
TempImage()
The default constructor creates an empty 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 void setMaximumCacheSize(uInt howManyPixels)
Set the maximum (allowed) cache size as indicated.
virtual Bool isWritable() const
Is the TempImage writable?
GroupType
Define the possible group types (regions or masks).
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual Bool hasPixelMask() const
Does the image object use a pixelmask? This is similar to isMasked().
Abstract base class to steer lattice iterators.
virtual void flush()
Flush the data.
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)...
virtual String imageType() const
Get the image type (returns name of derived class).
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.