casa
$Rev:20696$
|
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 89 of file FITSQualityImage.h.
casa::FITSQualityImage::FITSQualityImage | ( | const String & | name | ) | [explicit] |
Construct a FITSQualityImage from the FITS file name and extensions specified in the input.
casa::FITSQualityImage::FITSQualityImage | ( | const String & | name, |
uInt | whichDataHDU, | ||
uInt | whichErrorHDU | ||
) | [explicit] |
Construct a FITSQualityImage from the disk FITS file name and extensions.
casa::FITSQualityImage::FITSQualityImage | ( | const FITSQualityImage & | other | ) |
Copy constructor (reference semantics)
Destructor.
virtual uInt casa::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 casa::Lattice< Float >.
Bool casa::FITSQualityImage::checkInput | ( | ) | [private] |
Make sure the input is compatible.
virtual void casa::FITSQualityImage::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 ImageInterface<Float>* casa::FITSQualityImage::cloneII | ( | ) | const [virtual] |
Make a copy of the object with new (reference semantics).
Implements casa::ImageInterface< Float >.
DataType casa::FITSQualityImage::dataType | ( | ) | const [virtual] |
Return the (internal) data type (TpFloat or TpShort).
Reimplemented from casa::Lattice< Float >.
virtual Bool casa::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 casa::MaskedLattice< Float >.
virtual Bool casa::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 casa::Lattice< Float >.
virtual IPosition casa::FITSQualityImage::doNiceCursorShape | ( | uInt | maxPixels | ) | const [virtual] |
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::FITSQualityImage::doPutSlice | ( | const Array< Float > & | sourceBuffer, |
const IPosition & | where, | ||
const IPosition & | stride | ||
) | [virtual] |
The FITSQualityImage is not writable, so this throws an exception.
Implements casa::Lattice< Float >.
FITSImage* casa::FITSQualityImage::fitsData | ( | ) | const [inline] |
FITSErrorImage* casa::FITSQualityImage::fitsError | ( | ) | const [inline] |
void casa::FITSQualityImage::getExtInfo | ( | ) | [private] |
Get the extension indices from an extension expression.
virtual const LatticeRegion* casa::FITSQualityImage::getRegionPtr | ( | ) | const [virtual] |
virtual Bool casa::FITSQualityImage::hasPixelMask | ( | ) | const [virtual] |
FITSQualityImage always has a pixel mask so returns True.
Reimplemented from casa::MaskedLattice< Float >.
virtual String casa::FITSQualityImage::imageType | ( | ) | const [virtual] |
Get the image type (returns FITSImage).
Implements casa::ImageInterface< Float >.
virtual Bool casa::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 casa::MaskedLattice< Float >.
virtual Bool casa::FITSQualityImage::isPaged | ( | ) | const [virtual] |
The lattice is paged to disk.
Reimplemented from casa::LatticeBase.
virtual Bool casa::FITSQualityImage::isPersistent | ( | ) | const [virtual] |
The lattice is persistent.
Reimplemented from casa::LatticeBase.
virtual Bool casa::FITSQualityImage::isWritable | ( | ) | const [virtual] |
The FITSImage is not writable.
Reimplemented from casa::LatticeBase.
virtual uInt casa::FITSQualityImage::maximumCacheSize | ( | ) | const [virtual] |
virtual String casa::FITSQualityImage::name | ( | Bool | stripPath = False | ) | const [virtual] |
Returns the name of the disk file.
Implements casa::ImageInterface< Float >.
virtual Bool casa::FITSQualityImage::ok | ( | ) | const [virtual] |
Check class invariants.
Implements casa::ImageInterface< Float >.
FITSQualityImage& casa::FITSQualityImage::operator= | ( | const FITSQualityImage & | other | ) |
Assignment (reference semantics).
virtual const Lattice<Bool>& casa::FITSQualityImage::pixelMask | ( | ) | const [virtual] |
Get access to the pixelmask.
FITSQualityImage always has a pixel mask.
Reimplemented from casa::MaskedLattice< Float >.
virtual Lattice<Bool>& casa::FITSQualityImage::pixelMask | ( | ) | [virtual] |
Reimplemented from casa::MaskedLattice< Float >.
static Bool casa::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 casa::FITSQualityImage::reopen | ( | ) | [virtual] |
Reopen a temporarily closed image.
Reimplemented from casa::LatticeBase.
void casa::FITSQualityImage::reopenDataIfNeeded | ( | ) | [private] |
void casa::FITSQualityImage::reopenErrorIfNeeded | ( | ) | [private] |
void casa::FITSQualityImage::reopenIfNeeded | ( | ) | const [private] |
Reopen the image if needed.
virtual void casa::FITSQualityImage::resize | ( | const TiledShape & | newShape | ) | [virtual] |
Function which changes the shape of the FITSQualityImage.
Throws an exception as FITSQualityImage is not writable.
Implements casa::ImageInterface< Float >.
virtual void casa::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 casa::LatticeBase.
virtual void casa::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 casa::LatticeBase.
virtual void casa::FITSQualityImage::setMaximumCacheSize | ( | uInt | howManyPixels | ) | [virtual] |
Set the maximum (allowed) cache size as indicated.
Reimplemented from casa::LatticeBase.
void casa::FITSQualityImage::setup | ( | ) | [private] |
Setup the object (used by constructors).
virtual IPosition casa::FITSQualityImage::shape | ( | ) | const [virtual] |
Return the shape of the FITSImage.
Implements casa::LatticeBase.
virtual void casa::FITSQualityImage::showCacheStatistics | ( | ostream & | os | ) | const [virtual] |
Report on cache success.
Reimplemented from casa::LatticeBase.
virtual void casa::FITSQualityImage::tempClose | ( | ) | [virtual] |
Temporarily close the image.
Reimplemented from casa::LatticeBase.
virtual void casa::FITSQualityImage::tempCloseData | ( | ) | [virtual] |
virtual void casa::FITSQualityImage::tempCloseError | ( | ) | [virtual] |
uInt casa::FITSQualityImage::whichDataHDU | ( | ) | const [inline] |
Return the data HDU number.
Definition at line 206 of file FITSQualityImage.h.
References whichDataHDU_p.
uInt casa::FITSQualityImage::whichErrorHDU | ( | ) | const [inline] |
Return the error HDU number.
Definition at line 210 of file FITSQualityImage.h.
References whichErrorHDU_p.
Definition at line 249 of file FITSQualityImage.h.
FITSImage* casa::FITSQualityImage::fitsdata_p [private] |
Definition at line 242 of file FITSQualityImage.h.
Referenced by fitsData().
Definition at line 243 of file FITSQualityImage.h.
Referenced by fitsError().
String casa::FITSQualityImage::fullname_p [private] |
Definition at line 241 of file FITSQualityImage.h.
Bool casa::FITSQualityImage::isClosed_p [private] |
Definition at line 250 of file FITSQualityImage.h.
Bool casa::FITSQualityImage::isDataClosed_p [private] |
Definition at line 251 of file FITSQualityImage.h.
Bool casa::FITSQualityImage::isErrorClosed_p [private] |
Definition at line 252 of file FITSQualityImage.h.
String casa::FITSQualityImage::name_p [private] |
Definition at line 240 of file FITSQualityImage.h.
Lattice<Bool>* casa::FITSQualityImage::pPixelMask_p [private] |
Definition at line 244 of file FITSQualityImage.h.
TiledShape casa::FITSQualityImage::shape_p [private] |
Definition at line 245 of file FITSQualityImage.h.
uInt casa::FITSQualityImage::whichDataHDU_p [private] |
Definition at line 246 of file FITSQualityImage.h.
Referenced by whichDataHDU().
uInt casa::FITSQualityImage::whichErrorHDU_p [private] |
Definition at line 247 of file FITSQualityImage.h.
Referenced by whichErrorHDU().
uInt casa::FITSQualityImage::whichMaskHDU_p [private] |
Definition at line 248 of file FITSQualityImage.h.