casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::FITSQualityMask Class Reference

Provides an on-the-fly mask for FITS quality images. More...

#include <FITSQualityMask.h>

Inheritance diagram for casa::FITSQualityMask:
casa::Lattice< Bool > casa::LatticeBase

List of all members.

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.
FITSQualityMaskoperator= (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 &section)
 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

FITSImageitsFitsData
FITSErrorImageitsFitsError
Array< FloatitsBuffer
Bool itsFilterZero

Detailed Description

Provides an on-the-fly mask for FITS quality images.

Intended use:

Public interface

Prerequisite

Etymology

This class provides a pixel mask for the FITSQualityImage class.

Synopsis

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.

Example

Motivation

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.


Constructor & Destructor Documentation

The pointers are not cloned, just copied.

Copy constructor (reference semantics).

Destructor.


Member Function Documentation

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]

Do the actual getting of an array of values.

Throws an exception.

Implements casa::Lattice< Bool >.

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.

Return the shape of the Lattice including all degenerate axes (ie.

axes with a length of one)

Implements casa::LatticeBase.


Member Data Documentation

Definition at line 147 of file FITSQualityMask.h.

Definition at line 148 of file FITSQualityMask.h.

Definition at line 145 of file FITSQualityMask.h.

Definition at line 146 of file FITSQualityMask.h.


The documentation for this class was generated from the following file: