MIRIADImage.h
Classes
- MIRIADImage -- Class providing native access to MIRIAD images. (full description)
Interface
- Public Members
- explicit MIRIADImage(const String& name)
- MIRIADImage(const String& name, const MaskSpecifier&)
- MIRIADImage(const MIRIADImage& other)
- ~MIRIADImage()
- MIRIADImage& operator=(const MIRIADImage& other)
- virtual ImageInterface<Float>* cloneII() const
- virtual String imageType() const
- virtual void resize(const TiledShape& newShape)
- virtual Bool setUnits(const Unit& newUnits)
- virtual Unit units() const
- virtual const RecordInterface &miscInfo() const
- virtual Bool setMiscInfo(const RecordInterface &newInfo)
- virtual Bool isMasked() const
- virtual Bool hasPixelMask() const
- virtual const Lattice<Bool>& pixelMask() const
- virtual Lattice<Bool>& pixelMask()
- virtual Bool doGetMaskSlice (Array<Bool>& buffer, const Slicer& section)
- virtual const LatticeRegion* getRegionPtr() const
- virtual Bool doGetSlice (Array<Float>& buffer, const Slicer& theSlice)
- virtual void doPutSlice (const Array<Float>& sourceBuffer, const IPosition& where, const IPosition& stride)
- virtual Bool isPaged() const
- virtual Bool isPersistent() const
- virtual Bool isWritable() const
- virtual String name (Bool stripPath=False) const
- virtual IPosition shape() const
- virtual uInt advisedMaxPixels() const
- virtual IPosition doNiceCursorShape (uInt maxPixels) const
- virtual void tempClose()
- virtual void reopen()
- virtual Bool ok() const
- DataType dataType () const
- virtual uInt maximumCacheSize() const
- virtual void setMaximumCacheSize (uInt howManyPixels)
- virtual void setCacheSizeFromPath (const IPosition& sliceShape, const IPosition& windowStart, const IPosition& windowLength, const IPosition& axisPath)
- virtual void setCacheSizeInTiles (uInt howManyTiles)
- virtual void clearCache()
- virtual void showCacheStatistics (ostream& os) const
- Private Members
- void reopenIfNeeded() const
- void setup()
- void open()
- void getImageAttributes (CoordinateSystem& cSys, IPosition& shape, ImageInfo& info, Unit& brightnessUnit, Record& miscInfo, Bool& hasBlanks, const String& name)
- void crackHeader (CoordinateSystem& cSys, IPosition& shape, ImageInfo& imageInfo, Unit& brightnessUnit, Record& miscInfo, LogIO&os)
Review Status
- Programs:
- Tests:
Prerequisite
Etymology
This class provides native access to MIRIAD images.
Synopsis
A MIRIADImage provides native access to MIRIAD images by accessing them
with the TiledFileAccess class. -- or -- the native miriad I/O routines.
The MIRIADImage is read only. -- really -- ??
Example
MIRIADImage im("cube1");
LogIO logger(or);
ImageStatistics<Float> stats(im, logger);
Bool ok = stats.display(); // Display statistics
Motivation
This provides native access to MIRIAD images.
Member Description
explicit MIRIADImage(const String& name)
Construct a MIRIADImage from the disk MIRIAD dataset name and apply mask.
Construct a MIRIADImage from the disk MIRIAD file name and apply mask or not.
MIRIADImage(const MIRIADImage& other)
Copy constructor (reference semantics)
Destructor does nothing
MIRIADImage& operator=(const MIRIADImage& other)
Assignment (reference semantics)
virtual ImageInterface<Float>* cloneII() const
Make a copy of the object with new (reference semantics).
Get the image type (returns MIRIADImage).
Function which changes the shape of the MIRIADImage.
Throws an exception as MIRIADImage is not writable.
virtual Bool setUnits(const Unit& newUnits)
virtual Unit units() const
Functions which get and set the units associated with the image
pixels (i.e. the "brightness" unit). Initially the unit is empty.
Although the MIRIADimage is not writable, you can change the
unit in the MIRIADImage object, but it will not be changed
in the MIRIAD disk file.
virtual const RecordInterface &miscInfo() const
virtual Bool setMiscInfo(const RecordInterface &newInfo)
Often we have miscellaneous information we want to attach to an image.
Although MIRIADImage is not writable, you can set a new
MiscInfo record, but it will not be stored with the MIRIAD file
virtual Bool isMasked() const
Has the object really a mask? The MIRIADImage always
has a pixel mask and never has a region mask so this
should always return True
MIRIADimage always has a pixel mask so should return True
Get access to the pixelmask. MIRIADImage always has a pixel mask.
Do the actual get of the mask data. The return value is always
False, thus the buffer does not reference another array.
Get the region used. There is no region.
Always returns 0.
virtual Bool doGetSlice (Array<Float>& buffer, const Slicer& theSlice)
Do the actual get of the data.
Returns False as the data do not reference another Array
virtual void doPutSlice (const Array<Float>& sourceBuffer, const IPosition& where, const IPosition& stride)
The MIRIADImage is not writable, so this throws an exception.
virtual Bool isPaged() const
The lattice is paged to disk.
The lattice is persistent.
virtual Bool isWritable() const
The MIRIADImage is not writable.
virtual String name (Bool stripPath=False) const
Returns the name of the disk file.
return the shape of the MIRIADImage
Returns the maximum recommended number of pixels for a cursor. This is
the number of pixels in a tile.
Help the user pick a cursor for most efficient access if they only want
pixel values and don't care about the order or dimension of the
cursor.
Temporarily close the image.
virtual void reopen()
Reopen a temporarily closed image.
virtual Bool ok() const
Check class invariants.
DataType dataType () const
Return the (internal) data type (TpFloat or TpShort).
Maximum size - not necessarily all used. In pixels.
Set the maximum (allowed) cache size as indicated.
Set the cache size as to "fit" the indicated path.
Set the actual cache size for this Array to be be big enough for the
indicated number of tiles. This cache is not shared with PagedArrays
in other rows and is always clipped to be less than the maximum value
set using the setMaximumCacheSize member function.
tiles. Tiles are cached using a first in first out algorithm.
Clears and frees up the caches, but the maximum allowed cache size is
unchanged from when setCacheSize was called
Report on cache success.
Reopen the image if needed.
Setup the object (used by constructors).
Open the image (used by setup and reopen).
Fish things out of the MIRIAD file