Class providing native access to FITS Quality Images. More...
#include <FITSQualityImage.h>
Public Member Functions | |
FITSQualityImage (const String &name) | |
Construct a FITSQualityImage from the FITS file name and extensions specified in the input. | |
FITSQualityImage (const String &name, uInt whichDataHDU, uInt whichErrorHDU) | |
Construct a FITSQualityImage from the disk FITS file name and extensions. | |
FITSQualityImage (const FITSQualityImage &other) | |
Copy constructor (reference semantics). | |
~FITSQualityImage () | |
Destructor. | |
FITSQualityImage & | operator= (const FITSQualityImage &other) |
Assignment (reference semantics). | |
virtual ImageInterface< Float > * | cloneII () const |
Make a copy of the object with new (reference semantics). | |
FITSImage * | fitsData () const |
Get the FITS data. | |
FITSErrorImage * | fitsError () const |
Get the FITS error. | |
virtual String | imageType () const |
Get the image type (returns FITSImage). | |
virtual void | resize (const TiledShape &newShape) |
Function which changes the shape of the FITSQualityImage. | |
virtual Bool | isMasked () const |
Has the object really a mask? The FITSQualityImage always has a pixel mask and never has a region mask so this always returns True. | |
virtual Bool | hasPixelMask () const |
FITSQualityImage always has a pixel mask so returns True. | |
virtual const Lattice< Bool > & | pixelMask () const |
Get access to the pixelmask. | |
virtual Lattice< Bool > & | pixelMask () |
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 FITSQualityImage is not writable, so this throws an exception. | |
virtual Bool | doGetMaskSlice (Array< Bool > &buffer, const Slicer §ion) |
Do the actual get of the mask data. | |
virtual Bool | isPaged () const |
The lattice is paged to disk. | |
virtual Bool | isPersistent () const |
The lattice is persistent. | |
virtual Bool | isWritable () const |
The FITSImage 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 FITSImage. | |
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 Bool | ok () const |
Check class invariants. | |
virtual void | tempClose () |
Temporarily close the image. | |
virtual void | tempCloseData () |
virtual void | tempCloseError () |
virtual void | reopen () |
Reopen a temporarily closed image. | |
DataType | dataType () const |
Return the (internal) data type (TpFloat or TpShort). | |
uInt | whichDataHDU () const |
Return the data HDU number. | |
uInt | whichErrorHDU () const |
Return the error HDU number. | |
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. | |
Static Public Member Functions | |
static Bool | qualFITSInfo (String &error, TableRecord &dataExtMiscInfo, TableRecord &errorExtMiscInfo, const TableRecord &miscInfo) |
Given the misc-info of a CASA image (with quality-axis) the misc-info of the data sub-image and the error sub-image are produced. | |
Private Member Functions | |
void | reopenIfNeeded () const |
Reopen the image if needed. | |
void | reopenDataIfNeeded () |
void | reopenErrorIfNeeded () |
void | getExtInfo () |
Get the extension indices from an extension expression. | |
void | setup () |
Setup the object (used by constructors). | |
Bool | checkInput () |
Make sure the input is compatible. | |
Private Attributes | |
String | name_p |
String | fullname_p |
FITSImage * | fitsdata_p |
FITSErrorImage * | fitserror_p |
Lattice< Bool > * | pPixelMask_p |
TiledShape | shape_p |
uInt | whichDataHDU_p |
uInt | whichErrorHDU_p |
uInt | whichMaskHDU_p |
FITSErrorImage::ErrorType | errType_p |
Bool | isClosed_p |
Bool | isDataClosed_p |
Bool | isErrorClosed_p |
Class providing native access to FITS Quality Images.
Public interface
The class provides access to a quality image via two extensions in the corresponding FITS file.
A FITSQualityImage provides native access to FITS images by accessing the data and the error values via the classes FITSImage and FITSErrorImage, respectively. A QualityCoordinate connects these two layers. The FITSQualityImage is read only.
FITSQualityImage fitsQIStat("im.fits", 1, 2); LogIO logger(or); ImageStatistics<Float> stats(fitsQIStat, logger); Bool ok = stats.display();
This provides access to FITS Quality Images
Definition at line 90 of file FITSQualityImage.h.
casacore::FITSQualityImage::FITSQualityImage | ( | const String & | name | ) | [explicit] |
Construct a FITSQualityImage from the FITS file name and extensions specified in the input.
casacore::FITSQualityImage::FITSQualityImage | ( | const String & | name, | |
uInt | whichDataHDU, | |||
uInt | whichErrorHDU | |||
) | [explicit] |
Construct a FITSQualityImage from the disk FITS file name and extensions.
casacore::FITSQualityImage::FITSQualityImage | ( | const FITSQualityImage & | other | ) |
Copy constructor (reference semantics).
casacore::FITSQualityImage::~FITSQualityImage | ( | ) |
Destructor.
virtual uInt casacore::FITSQualityImage::advisedMaxPixels | ( | ) | const [virtual] |
Returns the maximum recommended number of pixels for a cursor.
This is the number of pixels in a tile.
Reimplemented from casacore::Lattice< Float >.
Bool casacore::FITSQualityImage::checkInput | ( | ) | [private] |
Make sure the input is compatible.
virtual void casacore::FITSQualityImage::clearCache | ( | ) | [virtual] |
Clears and frees up the caches, but the maximum allowed cache size is unchanged from when setCacheSize was called.
Reimplemented from casacore::LatticeBase.
virtual ImageInterface<Float>* casacore::FITSQualityImage::cloneII | ( | ) | const [virtual] |
Make a copy of the object with new (reference semantics).
Implements casacore::ImageInterface< Float >.
DataType casacore::FITSQualityImage::dataType | ( | ) | const [virtual] |
Return the (internal) data type (TpFloat or TpShort).
Reimplemented from casacore::Lattice< Float >.
virtual Bool casacore::FITSQualityImage::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 casacore::MaskedLattice< Float >.
virtual Bool casacore::FITSQualityImage::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
Implements casacore::Lattice< Float >.
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 casacore::LatticeBase.
virtual void casacore::FITSQualityImage::doPutSlice | ( | const Array< Float > & | sourceBuffer, | |
const IPosition & | where, | |||
const IPosition & | stride | |||
) | [virtual] |
The FITSQualityImage is not writable, so this throws an exception.
Implements casacore::Lattice< Float >.
FITSImage* casacore::FITSQualityImage::fitsData | ( | ) | const [inline] |
FITSErrorImage* casacore::FITSQualityImage::fitsError | ( | ) | const [inline] |
void casacore::FITSQualityImage::getExtInfo | ( | ) | [private] |
Get the extension indices from an extension expression.
virtual const LatticeRegion* casacore::FITSQualityImage::getRegionPtr | ( | ) | const [virtual] |
Get the region used.
There is no region. Always returns 0.
Implements casacore::MaskedLattice< Float >.
virtual Bool casacore::FITSQualityImage::hasPixelMask | ( | ) | const [virtual] |
FITSQualityImage always has a pixel mask so returns True.
Reimplemented from casacore::MaskedLattice< Float >.
virtual String casacore::FITSQualityImage::imageType | ( | ) | const [virtual] |
Get the image type (returns FITSImage).
Implements casacore::ImageInterface< Float >.
virtual Bool casacore::FITSQualityImage::isMasked | ( | ) | const [virtual] |
Has the object really a mask? The FITSQualityImage always has a pixel mask and never has a region mask so this always returns True.
Reimplemented from casacore::MaskedLattice< Float >.
virtual Bool casacore::FITSQualityImage::isPaged | ( | ) | const [virtual] |
The lattice is paged to disk.
Reimplemented from casacore::LatticeBase.
virtual Bool casacore::FITSQualityImage::isPersistent | ( | ) | const [virtual] |
The lattice is persistent.
Reimplemented from casacore::LatticeBase.
virtual Bool casacore::FITSQualityImage::isWritable | ( | ) | const [virtual] |
The FITSImage is not writable.
Reimplemented from casacore::LatticeBase.
virtual uInt casacore::FITSQualityImage::maximumCacheSize | ( | ) | const [virtual] |
Returns the name of the disk file.
Implements casacore::ImageInterface< Float >.
virtual Bool casacore::FITSQualityImage::ok | ( | ) | const [virtual] |
Check class invariants.
Implements casacore::ImageInterface< Float >.
FITSQualityImage& casacore::FITSQualityImage::operator= | ( | const FITSQualityImage & | other | ) |
Assignment (reference semantics).
Reimplemented from casacore::LatticeBase.
Reimplemented from casacore::MaskedLattice< Float >.
Get access to the pixelmask.
FITSQualityImage always has a pixel mask.
Reimplemented from casacore::MaskedLattice< Float >.
static Bool casacore::FITSQualityImage::qualFITSInfo | ( | String & | error, | |
TableRecord & | dataExtMiscInfo, | |||
TableRecord & | errorExtMiscInfo, | |||
const TableRecord & | miscInfo | |||
) | [static] |
Given the misc-info of a CASA image (with quality-axis) the misc-info of the data sub-image and the error sub-image are produced.
This ensures that, if written to FITS, the data and error extensions have the all necessary keywords.
virtual void casacore::FITSQualityImage::reopen | ( | ) | [virtual] |
Reopen a temporarily closed image.
Reimplemented from casacore::LatticeBase.
void casacore::FITSQualityImage::reopenDataIfNeeded | ( | ) | [private] |
void casacore::FITSQualityImage::reopenErrorIfNeeded | ( | ) | [private] |
void casacore::FITSQualityImage::reopenIfNeeded | ( | ) | const [private] |
Reopen the image if needed.
virtual void casacore::FITSQualityImage::resize | ( | const TiledShape & | newShape | ) | [virtual] |
Function which changes the shape of the FITSQualityImage.
Throws an exception as FITSQualityImage is not writable.
Implements casacore::ImageInterface< Float >.
virtual void casacore::FITSQualityImage::setCacheSizeFromPath | ( | const IPosition & | sliceShape, | |
const IPosition & | windowStart, | |||
const IPosition & | windowLength, | |||
const IPosition & | axisPath | |||
) | [virtual] |
Set the cache size as to "fit" the indicated path.
Reimplemented from casacore::LatticeBase.
virtual void casacore::FITSQualityImage::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 casacore::LatticeBase.
virtual void casacore::FITSQualityImage::setMaximumCacheSize | ( | uInt | howManyPixels | ) | [virtual] |
Set the maximum (allowed) cache size as indicated.
Reimplemented from casacore::LatticeBase.
void casacore::FITSQualityImage::setup | ( | ) | [private] |
Setup the object (used by constructors).
virtual IPosition casacore::FITSQualityImage::shape | ( | ) | const [virtual] |
Return the shape of the FITSImage.
Implements casacore::LatticeBase.
virtual void casacore::FITSQualityImage::showCacheStatistics | ( | ostream & | os | ) | const [virtual] |
Report on cache success.
Reimplemented from casacore::LatticeBase.
virtual void casacore::FITSQualityImage::tempClose | ( | ) | [virtual] |
Temporarily close the image.
Reimplemented from casacore::LatticeBase.
virtual void casacore::FITSQualityImage::tempCloseData | ( | ) | [virtual] |
virtual void casacore::FITSQualityImage::tempCloseError | ( | ) | [virtual] |
uInt casacore::FITSQualityImage::whichDataHDU | ( | ) | const [inline] |
Return the data HDU number.
Definition at line 207 of file FITSQualityImage.h.
References whichDataHDU_p.
uInt casacore::FITSQualityImage::whichErrorHDU | ( | ) | const [inline] |
Return the error HDU number.
Definition at line 211 of file FITSQualityImage.h.
References whichErrorHDU_p.
Definition at line 250 of file FITSQualityImage.h.
FITSImage* casacore::FITSQualityImage::fitsdata_p [private] |
Definition at line 243 of file FITSQualityImage.h.
Referenced by fitsData().
Definition at line 244 of file FITSQualityImage.h.
Referenced by fitsError().
String casacore::FITSQualityImage::fullname_p [private] |
Definition at line 242 of file FITSQualityImage.h.
Bool casacore::FITSQualityImage::isClosed_p [private] |
Definition at line 251 of file FITSQualityImage.h.
Definition at line 252 of file FITSQualityImage.h.
Definition at line 253 of file FITSQualityImage.h.
String casacore::FITSQualityImage::name_p [private] |
Definition at line 241 of file FITSQualityImage.h.
Lattice<Bool>* casacore::FITSQualityImage::pPixelMask_p [private] |
Definition at line 245 of file FITSQualityImage.h.
Definition at line 246 of file FITSQualityImage.h.
Definition at line 247 of file FITSQualityImage.h.
Referenced by whichDataHDU().
Definition at line 248 of file FITSQualityImage.h.
Referenced by whichErrorHDU().
Definition at line 249 of file FITSQualityImage.h.