#include <MIRIADImage.h>
Inheritance diagram for casa::MIRIADImage:


Part of API
This class provides native access to MIRIAD images.
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 -- ??
MIRIADImage im("cube1"); LogIO logger(or); ImageStatistics<Float> stats(im, logger); Bool ok = stats.display(); // Display statistics
This provides native access to MIRIAD images.
Definition at line 101 of file MIRIADImage.h.
Public Member Functions | |
| MIRIADImage (const String &name) | |
| Construct a MIRIADImage from the disk MIRIAD dataset name and apply mask. | |
| MIRIADImage (const String &name, const MaskSpecifier &) | |
| Construct a MIRIADImage from the disk MIRIAD file name and apply mask or not. | |
| MIRIADImage (const MIRIADImage &other) | |
| Copy constructor (reference semantics). | |
| ~MIRIADImage () | |
| 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). | |
| virtual String | imageType () const |
| Get the image type (returns MIRIADImage). | |
| virtual void | resize (const TiledShape &newShape) |
| Function which changes the shape of the MIRIADImage. | |
| 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. | |
| virtual Bool | hasPixelMask () const |
| MIRIADimage always has a pixel mask so should return True. | |
| virtual Bool | doGetMaskSlice (Array< Bool > &buffer, const Slicer §ion) |
| Do the actual get of the mask data. | |
| virtual const LatticeRegion * | getRegionPtr () const |
| Get the region used. | |
| virtual Bool | doGetSlice (Array< Float > &buffer, const Slicer &theSlice) |
| Do the actual get of the data. | |
| 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. | |
| virtual Bool | isPersistent () const |
| 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. | |
| virtual IPosition | shape () const |
| return the shape of the MIRIADImage | |
| virtual uInt | advisedMaxPixels () const |
| Returns the maximum recommended number of pixels for a cursor. | |
| virtual IPosition | doNiceCursorShape (uInt maxPixels) const |
| 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. | |
| virtual void | tempClose () |
| 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). | |
| virtual uInt | maximumCacheSize () const |
| Maximum size - not necessarily all used. | |
| virtual void | setMaximumCacheSize (uInt howManyPixels) |
| Set the maximum (allowed) cache size as indicated. | |
| 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 | setCacheSizeInTiles (uInt howManyTiles) |
| Set the actual cache size for this Array to be be big enough for the indicated number of tiles. | |
| virtual void | clearCache () |
| Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called. | |
| virtual void | showCacheStatistics (ostream &os) const |
| Report on cache success. | |
| virtual const RecordInterface & | miscInfo () const |
| Often we have miscellaneous information we want to attach to an image. | |
| virtual Bool | setMiscInfo (const RecordInterface &newInfo) |
| virtual const Lattice< Bool > & | pixelMask () const |
| Get access to the pixelmask. | |
| virtual Lattice< Bool > & | pixelMask () |
Static Public Member Functions | |
| static LatticeBase * | openMIRIADImage (const String &name, const MaskSpecifier &) |
| Function to open a MIRIAD image. | |
| static void | registerOpenFunction () |
| Register the open function. | |
Private Member Functions | |
| void | reopenIfNeeded () const |
| Reopen the image if needed. | |
| void | setup () |
| Setup the object (used by constructors). | |
| void | open () |
| Open the image (used by setup and reopen). | |
| void | getImageAttributes (CoordinateSystem &cSys, IPosition &shape, ImageInfo &info, Unit &brightnessUnit, Record &miscInfo, Bool &hasBlanks, const String &name) |
| Fish things out of the MIRIAD file. | |
| void | crackHeader (CoordinateSystem &cSys, IPosition &shape, ImageInfo &imageInfo, Unit &brightnessUnit, Record &miscInfo, LogIO &os) |
Private Attributes | |
| String | name_p |
| Int | tno_p |
| MaskSpecifier | maskSpec_p |
| Unit | unit_p |
| Record | rec_p |
| CountedPtr< TiledFileAccess > | pTiledFile_p |
| Lattice< Bool > * | pPixelMask_p |
| TiledShape | shape_p |
| Float scale_p; Float offset_p; Short magic_p;. | |
| Bool | hasBlanks_p |
| DataType | dataType_p |
| Int64 | fileOffset_p |
| Bool | isClosed_p |
| casa::MIRIADImage::MIRIADImage | ( | const String & | name | ) | [explicit] |
Construct a MIRIADImage from the disk MIRIAD dataset name and apply mask.
| casa::MIRIADImage::MIRIADImage | ( | const String & | name, | |
| const MaskSpecifier & | ||||
| ) |
Construct a MIRIADImage from the disk MIRIAD file name and apply mask or not.
| casa::MIRIADImage::MIRIADImage | ( | const MIRIADImage & | other | ) |
Copy constructor (reference semantics).
| casa::MIRIADImage::~MIRIADImage | ( | ) |
Destructor does nothing.
| MIRIADImage& casa::MIRIADImage::operator= | ( | const MIRIADImage & | other | ) |
Assignment (reference semantics).
| static LatticeBase* casa::MIRIADImage::openMIRIADImage | ( | const String & | name, | |
| const MaskSpecifier & | ||||
| ) | [static] |
Function to open a MIRIAD image.
| static void casa::MIRIADImage::registerOpenFunction | ( | ) | [static] |
Register the open function.
| virtual ImageInterface<Float>* casa::MIRIADImage::cloneII | ( | ) | const [virtual] |
| virtual String casa::MIRIADImage::imageType | ( | ) | const [virtual] |
| virtual void casa::MIRIADImage::resize | ( | const TiledShape & | newShape | ) | [virtual] |
Function which changes the shape of the MIRIADImage.
Throws an exception as MIRIADImage is not writable.
Implements casa::ImageInterface< T >.
| virtual const RecordInterface& casa::MIRIADImage::miscInfo | ( | ) | const [virtual] |
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
Reimplemented from casa::ImageInterface< T >.
| virtual Bool casa::MIRIADImage::setMiscInfo | ( | const RecordInterface & | newInfo | ) | [virtual] |
Reimplemented from casa::ImageInterface< T >.
| virtual Bool casa::MIRIADImage::isMasked | ( | ) | const [virtual] |
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.
Reimplemented from casa::MaskedLattice< T >.
| virtual Bool casa::MIRIADImage::hasPixelMask | ( | ) | const [virtual] |
MIRIADimage always has a pixel mask so should return True.
Reimplemented from casa::MaskedLattice< T >.
Get access to the pixelmask.
MIRIADImage always has a pixel mask.
Reimplemented from casa::MaskedLattice< T >.
Reimplemented from casa::MaskedLattice< T >.
| virtual Bool casa::MIRIADImage::doGetMaskSlice | ( | Array< Bool > & | buffer, | |
| const Slicer & | section | |||
| ) | [virtual] |
Do the actual get of the mask data.
The return value is always False, thus the buffer does not reference another array.
Reimplemented from casa::MaskedLattice< T >.
| virtual const LatticeRegion* casa::MIRIADImage::getRegionPtr | ( | ) | const [virtual] |
| virtual Bool casa::MIRIADImage::doGetSlice | ( | Array< Float > & | buffer, | |
| const Slicer & | theSlice | |||
| ) | [virtual] |
Do the actual get of the data.
Returns False as the data do not reference another Array
| virtual void casa::MIRIADImage::doPutSlice | ( | const Array< Float > & | sourceBuffer, | |
| const IPosition & | where, | |||
| const IPosition & | stride | |||
| ) | [virtual] |
The MIRIADImage is not writable, so this throws an exception.
| virtual Bool casa::MIRIADImage::isPaged | ( | ) | const [virtual] |
| virtual Bool casa::MIRIADImage::isPersistent | ( | ) | const [virtual] |
| virtual Bool casa::MIRIADImage::isWritable | ( | ) | const [virtual] |
| virtual IPosition casa::MIRIADImage::shape | ( | ) | const [virtual] |
| virtual uInt casa::MIRIADImage::advisedMaxPixels | ( | ) | const [virtual] |
Returns the maximum recommended number of pixels for a cursor.
This is the number of pixels in a tile.
Reimplemented from casa::Lattice< T >.
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.
Reimplemented from casa::LatticeBase.
| virtual void casa::MIRIADImage::tempClose | ( | ) | [virtual] |
| virtual void casa::MIRIADImage::reopen | ( | ) | [virtual] |
Reopen a temporarily closed image.
Reimplemented from casa::LatticeBase.
Referenced by reopenIfNeeded().
| virtual Bool casa::MIRIADImage::ok | ( | ) | const [virtual] |
| DataType casa::MIRIADImage::dataType | ( | ) | const [inline] |
Return the (internal) data type (TpFloat or TpShort).
Definition at line 230 of file MIRIADImage.h.
References dataType_p.
| virtual uInt casa::MIRIADImage::maximumCacheSize | ( | ) | const [virtual] |
| virtual void casa::MIRIADImage::setMaximumCacheSize | ( | uInt | howManyPixels | ) | [virtual] |
| virtual void casa::MIRIADImage::setCacheSizeInTiles | ( | uInt | howManyTiles | ) | [virtual] |
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.
Reimplemented from casa::LatticeBase.
| virtual void casa::MIRIADImage::clearCache | ( | ) | [virtual] |
Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called.
Reimplemented from casa::LatticeBase.
| virtual void casa::MIRIADImage::showCacheStatistics | ( | ostream & | os | ) | const [virtual] |
| void casa::MIRIADImage::reopenIfNeeded | ( | ) | const [inline, private] |
Reopen the image if needed.
Definition at line 277 of file MIRIADImage.h.
References isClosed_p, and reopen().
| void casa::MIRIADImage::setup | ( | ) | [private] |
Setup the object (used by constructors).
| void casa::MIRIADImage::open | ( | ) | [private] |
Open the image (used by setup and reopen).
| void casa::MIRIADImage::getImageAttributes | ( | CoordinateSystem & | cSys, | |
| IPosition & | shape, | |||
| ImageInfo & | info, | |||
| Unit & | brightnessUnit, | |||
| Record & | miscInfo, | |||
| Bool & | hasBlanks, | |||
| const String & | name | |||
| ) | [private] |
Fish things out of the MIRIAD file.
| void casa::MIRIADImage::crackHeader | ( | CoordinateSystem & | cSys, | |
| IPosition & | shape, | |||
| ImageInfo & | imageInfo, | |||
| Unit & | brightnessUnit, | |||
| Record & | miscInfo, | |||
| LogIO & | os | |||
| ) | [private] |
String casa::MIRIADImage::name_p [private] |
Definition at line 260 of file MIRIADImage.h.
Int casa::MIRIADImage::tno_p [private] |
Definition at line 261 of file MIRIADImage.h.
MaskSpecifier casa::MIRIADImage::maskSpec_p [private] |
Definition at line 262 of file MIRIADImage.h.
Unit casa::MIRIADImage::unit_p [private] |
Record casa::MIRIADImage::rec_p [private] |
Definition at line 264 of file MIRIADImage.h.
Definition at line 265 of file MIRIADImage.h.
Lattice<Bool>* casa::MIRIADImage::pPixelMask_p [private] |
Definition at line 266 of file MIRIADImage.h.
TiledShape casa::MIRIADImage::shape_p [private] |
Bool casa::MIRIADImage::hasBlanks_p [private] |
Definition at line 271 of file MIRIADImage.h.
DataType casa::MIRIADImage::dataType_p [private] |
Int64 casa::MIRIADImage::fileOffset_p [private] |
Definition at line 273 of file MIRIADImage.h.
Bool casa::MIRIADImage::isClosed_p [private] |
1.5.1