Provides an on-the-fly mask for FITS quality images. More...
#include <FITSQualityMask.h>
Public Member Functions | |
FITSQualityMask (FITSImage *fitsData, FITSErrorImage *fitsError) | |
The pointers are not cloned, just copied. | |
FITSQualityMask (const FITSQualityMask &other) | |
Copy constructor (reference semantics). | |
virtual | ~FITSQualityMask () |
Destructor. | |
FITSQualityMask & | operator= (const FITSQualityMask &other) |
The assignment operator with reference semantics. | |
virtual Lattice< Bool > * | clone () const |
Make a copy of the object (reference semantics). | |
virtual Bool | isWritable () const |
Is the FITSMask writable? Returns False. | |
IPosition | shape () const |
Return the shape of the Lattice including all degenerate axes (ie. | |
virtual Bool | doGetSlice (Array< Bool > &buffer, const Slicer §ion) |
Do the actual getting of an array of values. | |
virtual void | doPutSlice (const Array< Bool > &sourceBuffer, const IPosition &where, const IPosition &stride) |
Do the actual getting of an array of values. | |
virtual void | setFilterZero (Bool filterZero) |
Set the switch for filtering 0.0. | |
Private Member Functions | |
FITSQualityMask () | |
Bool | filterNaN (bool *pMask, const float *pData, const uInt nelems) |
Mask out ONLY NaN's. | |
Bool | filterZeroNaN (Bool *pMask, const Float *pData, const uInt nelems) |
Mask out NaN's and values 0.0. | |
Private Attributes | |
FITSImage * | itsFitsData |
FITSErrorImage * | itsFitsError |
Array< Float > | itsBuffer |
Bool | itsFilterZero |
Provides an on-the-fly mask for FITS quality images.
Public interface
This class provides a pixel mask for the FITSQualityImage class.
Masked values are indicated in FITS images via magic value blanking. This class provides an on-the-fly mask. The doGetSlice function reads the data values and returns an Array<Bool> which is True (good) or False (bad - blanked)
Because FITSMask inherits from Lattice<Bool> it can be used as the private pixel mask data member for FITSQualityImage returned by the MaskedLattice::pixelMask() functions
The FITSQualityMask object is constructed from the FITSImage objects of the data and the error extension. These must be the same one that the FITSQUalityImage object constructs internally. They shared by both FITSImage and FITSMask.
FITSQualityImage provides access to FITS images with a data and and error extension. It needed an efficient way to handle the pixel mask other than iterating all the way through the image first to set a mask.
Definition at line 97 of file FITSQualityMask.h.
casacore::FITSQualityMask::FITSQualityMask | ( | FITSImage * | fitsData, | |
FITSErrorImage * | fitsError | |||
) |
The pointers are not cloned, just copied.
casacore::FITSQualityMask::FITSQualityMask | ( | const FITSQualityMask & | other | ) |
Copy constructor (reference semantics).
virtual casacore::FITSQualityMask::~FITSQualityMask | ( | ) | [virtual] |
Destructor.
casacore::FITSQualityMask::FITSQualityMask | ( | ) | [private] |
Make a copy of the object (reference semantics).
Implements casacore::Lattice< Bool >.
virtual Bool casacore::FITSQualityMask::doGetSlice | ( | Array< Bool > & | buffer, | |
const Slicer & | section | |||
) | [virtual] |
Do the actual getting of an array of values.
Implements casacore::Lattice< Bool >.
virtual void casacore::FITSQualityMask::doPutSlice | ( | const Array< Bool > & | sourceBuffer, | |
const IPosition & | where, | |||
const IPosition & | stride | |||
) | [virtual] |
Do the actual getting of an array of values.
Throws an exception.
Implements casacore::Lattice< Bool >.
Bool casacore::FITSQualityMask::filterNaN | ( | bool * | pMask, | |
const float * | pData, | |||
const uInt | nelems | |||
) | [private] |
Mask out ONLY NaN's.
Bool casacore::FITSQualityMask::filterZeroNaN | ( | Bool * | pMask, | |
const Float * | pData, | |||
const uInt | nelems | |||
) | [private] |
Mask out NaN's and values 0.0.
virtual Bool casacore::FITSQualityMask::isWritable | ( | ) | const [virtual] |
Is the FITSMask writable? Returns False.
Although it is not hard to implement writing of the mask, data values would be lost because of magic blanking.
Reimplemented from casacore::LatticeBase.
FITSQualityMask& casacore::FITSQualityMask::operator= | ( | const FITSQualityMask & | other | ) |
The assignment operator with reference semantics.
Reimplemented from casacore::LatticeBase.
virtual void casacore::FITSQualityMask::setFilterZero | ( | Bool | filterZero | ) | [virtual] |
Set the switch for filtering 0.0.
IPosition casacore::FITSQualityMask::shape | ( | ) | const [virtual] |
Return the shape of the Lattice including all degenerate axes (ie.
axes with a length of one)
Implements casacore::LatticeBase.
Array<Float> casacore::FITSQualityMask::itsBuffer [private] |
Definition at line 148 of file FITSQualityMask.h.
Bool casacore::FITSQualityMask::itsFilterZero [private] |
Definition at line 149 of file FITSQualityMask.h.
FITSImage* casacore::FITSQualityMask::itsFitsData [private] |
Definition at line 146 of file FITSQualityMask.h.
Definition at line 147 of file FITSQualityMask.h.