28 #ifndef IMAGES_PAGEDIMAGE_H
29 #define IMAGES_PAGEDIMAGE_H
135 template <
class T>
class PagedImage:
public ImageInterface<T>
141 const CoordinateSystem& coordinateInfo,
148 const CoordinateSystem& coordinateInfo,
149 const String& nameOfNewFile,
157 const CoordinateSystem& coordinateInfo,
158 const String& nameOfNewFile,
162 const CoordinateSystem& coordinateInfo,
163 const String& nameOfNewFile,
164 const TableLock& lockOptions,
175 explicit PagedImage (
const String& filename, MaskSpecifier = MaskSpecifier(),
183 PagedImage (
const String& filename,
const TableLock& lockOptions,
193 PagedImage<T>&
operator= (
const PagedImage<T>& other);
196 virtual ImageInterface<T>*
cloneII()
const;
200 {
return "PagedImage"; }
277 virtual void apply (T (*
function)(T));
278 virtual void apply (T (*
function)(
const T& ));
293 {
return map_p.table(); }
391 virtual void flush();
422 const String& nameOfNewFile,
472 #ifndef CASACORE_NO_AUTO_TEMPLATES
473 #include <casacore/images/Images/PagedImage.tcc>
474 #endif //# CASACORE_NO_AUTO_TEMPLATES
A Vector of integers, for indexing into Array<T> objects.
virtual void resize(const TiledShape &newShape)
Change the shape of the image (N.B.
virtual Bool hasPixelMask() const
Does the image object use a pixelmask?
LockOption
Define the possible table locking options.
Table & table()
Return the table holding the data.
PagedImage< T > & operator=(const PagedImage< T > &other)
Assignment operator (reference semantics).
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.
Map a domain object into a range object via operator().
void check_conformance(const Lattice< T > &other)
virtual LatticeIterInterface< T > * makeIter(const LatticeNavigator &navigator, Bool useRef) const
This is the implementation of the letter for the envelope Iterator class; Note: Not for public use ...
Main interface class to a read/write table.
virtual T getAt(const IPosition &where) const
These are the true implementations of the paran operator.
virtual void resync()
Resynchronize the PagedImage object with the table contents.
void makePagedImage(const TiledShape &mapShape, const CoordinateSystem &coordinateInfo, const String &nameOfNewFile, const TableLock &lockOptions, uInt rowNumber)
virtual Bool isWritable() const
Is the PagedImage writable?
virtual Bool isPaged() const
A PagedImage is always paged to disk.
virtual void flush()
Flush the data.
virtual String imageType() const
Get the image type (returns name of this derived class).
ImageAttrHandlerCasa itsAttrHandler
PagedImage< T > & operator+=(const Lattice< T > &other)
Add a lattice to this image.
uInt rowNumber() const
Return the current TableColumn row number.
void restoreImageInfo(const TableRecord &rec)
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 setMaximumCacheSize(uInt howManyPixels)
Set the maximum (allowed) cache size as indicated.
Abstract base class for an image attributes handler.
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 void clearCache()
Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSiz...
virtual void doPutSlice(const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride)
Function to replace the values in the map with soureBuffer.
virtual uInt advisedMaxPixels() const
Returns the maximum recommended number of pixels for a cursor.
virtual void setCacheSizeInTiles(uInt howManyTiles)
Set the actual cache size for this Array to be be big enough for the indicated number of tiles...
static String className()
Return the name of this derived class.
virtual Bool ok() const
Check for symmetry in data members.
void restoreUnits(const TableRecord &rec)
void restoreMiscInfo(const TableRecord &rec)
virtual const LatticeRegion * getRegionPtr() const
Get a pointer the default pixelmask object used with this image.
A base class for Lattice iterators.
Define the shape and tile shape.
A base class for astronomical images.
Class to specify which mask to use in an image.
virtual IPosition shape() const
Return the shape of the image.
virtual void useMask(MaskSpecifier=MaskSpecifier())
Use the mask as specified.
virtual void apply(T(*function)(T))
Replace every element, x, of the lattice with the result of f(x).
virtual uInt maximumCacheSize() const
Maximum size - not necessarily all used.
Abstract base class for an image attributes handler.
virtual Bool setMiscInfo(const RecordInterface &newInfo)
Replace the miscinfo in the PagedImage.
const Table & table() const
bool Bool
Define the standard types used by Casacore.
virtual Bool setImageInfo(const ImageInfo &info)
The ImageInfo object contains some miscellaneous information about the image, which unlike that store...
void applyMaskSpecifier(const MaskSpecifier &)
PagedImage(const TiledShape &mapShape, const CoordinateSystem &coordinateInfo, Table &table, uInt rowNumber=0)
Construct a new Image from shape and coordinate information.
virtual Bool isPersistent() const
A PagedImage is always persistent.
virtual void putAt(const T &value, const IPosition &where)
Put the value of a single element.
Class to hold table lock options.
A hierarchical collection of named fields of various types.
template <class T, class U> class vector;
virtual void tempClose()
Close the Image and associated files temporarily.
LatticeRegion * regionPtr_p
virtual Bool setUnits(const Unit &newUnits)
Function which sets the units associated with the image pixels (i.e.
Specify which elements to extract from an n-dimensional array.
void applyMask(const String &maskName)
static Table & getTable(void *imagePtr, Bool writable)
Function to return the internal Table object to the RegionHandler.
virtual const Lattice< Bool > & pixelMask() const
Get access to the pixelmask used.
virtual ImageInterface< T > * cloneII() const
Make a copy of the object (reference semantics).
String: the storage and methods of handling collections of characters.
An optionally strided region in a Lattice.
virtual Bool lock(FileLocker::LockType, uInt nattempts)
Handle the (un)locking.
virtual void reopen()
If needed, reopen a temporarily closed Image.
Abstract base class for Record classes.
LockType
Define the possible lock types.
virtual IPosition doNiceCursorShape(uInt maxPixels) const
Help the user pick a cursor for most efficient access.
Read, store, and manipulate astronomical images.
Miscellaneous information related to an image.
void restoreAll(const TableRecord &rec)
virtual void showCacheStatistics(ostream &os) const
Report on cache success.
GroupType
Define the possible group types (regions or masks).
Interconvert pixel and world coordinates.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
void rename(const String &newName)
Function to change the name of the Table file on disk.
virtual Bool doGetSlice(Array< T > &buffer, const Slicer &theSlice)
Function which extracts an array from the map.
DataType imagePixelType(const String &fileName)
Determine the pixel type in the PagedImage contained in fileName.
Abstract base class to steer lattice iterators.
virtual ImageAttrHandler & attrHandler(Bool createHandler=False)
Get access to the attribute handler.
virtual Bool hasLock(FileLocker::LockType) const
A Lattice that is read from or written to disk.
void attach_logtable()
This must be called in every constructor and place where the image is attached to a new image...
virtual Bool setCoordinateInfo(const CoordinateSystem &coords)
Flushes the new coordinate system to disk if the table is writable.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
virtual String name(Bool stripPath=False) const
Return the current Table name.