casa
$Rev:20696$
|
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 96 of file FITSQualityMask.h.
casa::FITSQualityMask::FITSQualityMask | ( | FITSImage * | fitsData, |
FITSErrorImage * | fitsError | ||
) |
The pointers are not cloned, just copied.
casa::FITSQualityMask::FITSQualityMask | ( | const FITSQualityMask & | other | ) |
Copy constructor (reference semantics).
virtual casa::FITSQualityMask::~FITSQualityMask | ( | ) | [virtual] |
Destructor.
casa::FITSQualityMask::FITSQualityMask | ( | ) | [private] |
virtual Lattice<Bool>* casa::FITSQualityMask::clone | ( | ) | const [virtual] |
Make a copy of the object (reference semantics).
Implements casa::Lattice< Bool >.
virtual Bool casa::FITSQualityMask::doGetSlice | ( | Array< Bool > & | buffer, |
const Slicer & | section | ||
) | [virtual] |
Do the actual getting of an array of values.
Implements casa::Lattice< Bool >.
virtual void casa::FITSQualityMask::doPutSlice | ( | const Array< Bool > & | sourceBuffer, |
const IPosition & | where, | ||
const IPosition & | stride | ||
) | [virtual] |
Bool casa::FITSQualityMask::filterNaN | ( | bool * | pMask, |
const float * | pData, | ||
const uInt | nelems | ||
) | [private] |
Mask out ONLY NaN's.
Bool casa::FITSQualityMask::filterZeroNaN | ( | Bool * | pMask, |
const Float * | pData, | ||
const uInt | nelems | ||
) | [private] |
Mask out NaN's and values 0.0.
virtual Bool casa::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 casa::LatticeBase.
FITSQualityMask& casa::FITSQualityMask::operator= | ( | const FITSQualityMask & | other | ) |
The assignment operator with reference semantics.
virtual void casa::FITSQualityMask::setFilterZero | ( | Bool | filterZero | ) | [virtual] |
Set the switch for filtering 0.0.
IPosition casa::FITSQualityMask::shape | ( | ) | const [virtual] |
Return the shape of the Lattice including all degenerate axes (ie.
axes with a length of one)
Implements casa::LatticeBase.
Array<Float> casa::FITSQualityMask::itsBuffer [private] |
Definition at line 147 of file FITSQualityMask.h.
Bool casa::FITSQualityMask::itsFilterZero [private] |
Definition at line 148 of file FITSQualityMask.h.
FITSImage* casa::FITSQualityMask::itsFitsData [private] |
Definition at line 145 of file FITSQualityMask.h.
Definition at line 146 of file FITSQualityMask.h.