Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1MomentClip.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 21:36:30 2011
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п
casacore: casa::MomentClip< T > Class Template Reference
Public Member Functions | Private Attributes

casa::MomentClip< T > Class Template Reference
[Images_module]

Computes simple clipped, and masked moments. More...

#include <MomentCalculator.h>

Inheritance diagram for casa::MomentClip< T >:
casa::MomentCalcBase< T > casa::LineCollapser< T, T >

List of all members.

Public Member Functions

 MomentClip (Lattice< T > *pAncilliaryLattice, ImageMoments< T > &iMom, LogIO &os, const uInt nLatticeOut)
 Constructor.
 ~MomentClip ()
 Destructor (does nothing).
virtual void process (T &out, Bool &outMask, const Vector< T > &in, const Vector< Bool > &inMask, const IPosition &pos)
 This function is not implemented and throws an exception.
virtual void multiProcess (Vector< T > &out, Vector< Bool > &outMask, const Vector< T > &in, const Vector< Bool > &inMask, const IPosition &pos)
 This function returns a vector of numbers from each input vector.
virtual Bool canHandleNullMask () const
 Can handle null mask.

Private Attributes

Lattice< T > * pAncilliaryLattice_p
ImageMoments< T > & iMom_p
LogIO os_p
const Vector< T > * pProfileSelect_p
Vector< T > ancilliarySliceRef_p
Vector< T > selectedData_p
Vector< IntselectedDataIndex_p
Bool doInclude_p
Bool doExclude_p
Vector< T > range_p
IPosition sliceShape_p

Detailed Description

template<class T>
class casa::MomentClip< T >

Computes simple clipped, and masked moments.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Synopsis

This concrete class is derived from the abstract base class MomentCalcBase which provides an interface layer to the ImageMoments driver class. ImageMoments creates a MomentClip object and passes it to the LatticeApply function, lineMultiApply. This function iterates through a given lattice, and invokes the multiProcess member function of MomentClip on each vector of pixels that it extracts from the input lattice. The multiProcess function returns a vector of moments which are inserted into the output lattices also supplied to the LatticeApply function.

MomentClip computes moments directly from a vector of pixel intensities extracted from the primary lattice. An optional pixel intensity inclusion or exclusion range can be applied. It can also compute a mask based on the inclusion or exclusion ranges applied to an ancilliary lattice (the ancilliary vector corresponding to the primary vector is extracted). This mask is then applied to the primary vector for moment computation (ImageMoments offers a smoothed version of the primary lattice as the ancilliary lattice)

The constructor takes an ImageMoments object; the one that is constructing the MomentClip object of course. There is much control information embodied in the state of the ImageMoments object. This information is extracted by the MomentCalcBase class and passed on to MomentClip for consumption.

Note that the ancilliary lattice is only accessed if the ImageMoments object indicates that a pixel inclusion or exclusion range has been given as well as the pointer to the lattice having a non-zero value.

See the ImageMoments for discussion about the moments that are available for computation.

Example

This example comes from ImageMoments. outPt is a pointer block holding pointers to the output lattices. The ancilliary masking lattice is just a smoothed version of the input lattice.

   // Construct desired moment calculator object.  Use it polymorphically 
   // via a pointer to the base class.  os_P is a LogIO object.
   
      MomentCalcBase<T>* pMomentCalculator = 0;
      if (clipMethod || smoothClipMethod) {
         pMomentCalculator = new MomentClip<T>(pSmoothedImage, *this, os_p, outPt.nelements());
      } else if (windowMethod) {
         pMomentCalculator = new MomentWindow<T>(pSmoothedImage, *this, os_p, outPt.nelements());
      } else if (fitMethod) {
         pMomentCalculator = new MomentFit<T>(*this, os_p, outPt.nelements());
      }
   
   // Iterate optimally through the image, compute the moments, fill the output lattices
   
      LatticeApply<T>::lineMultiApply(outPt, *pInImage_p, *pMomentCalculator,   
                                      momentAxis_p, pProgressMeter);
      delete pMomentCalculator;


Tip: Note that there are is assignment operator or copy constructor; Do not use the ones the system would generate either;

Definition at line 597 of file MomentCalculator.h.


Constructor & Destructor Documentation

template<class T >
casa::MomentClip< T >::MomentClip ( Lattice< T > *  pAncilliaryLattice,
ImageMoments< T > &  iMom,
LogIO os,
const uInt  nLatticeOut 
)

Constructor.

The pointer is to an ancilliary lattice used as a mask. If no masking lattice is desired, the pointer value must be zero. We also need the ImageMoments object which is calling us, the ImageMoments logger, and the number of output lattices ImageMoments has created.

template<class T >
casa::MomentClip< T >::~MomentClip (  ) 

Destructor (does nothing).


Member Function Documentation

template<class T >
virtual Bool casa::MomentClip< T >::canHandleNullMask (  )  const [inline, virtual]

Can handle null mask.

Reimplemented from casa::LineCollapser< T, T >.

Definition at line 630 of file MomentCalculator.h.

template<class T >
virtual void casa::MomentClip< T >::multiProcess ( Vector< T > &  out,
Vector< Bool > &  outMask,
const Vector< T > &  in,
const Vector< Bool > &  inMask,
const IPosition pos 
) [virtual]

This function returns a vector of numbers from each input vector.

the output vector contains the moments known to the ImageMoments object passed into the constructor.

Implements casa::LineCollapser< T, T >.

template<class T >
virtual void casa::MomentClip< T >::process ( T &  out,
Bool outMask,
const Vector< T > &  in,
const Vector< Bool > &  inMask,
const IPosition pos 
) [virtual]

This function is not implemented and throws an exception.

Implements casa::LineCollapser< T, T >.


Member Data Documentation

template<class T >
Vector<T> casa::MomentClip< T >::ancilliarySliceRef_p [private]

Definition at line 639 of file MomentCalculator.h.

template<class T >
Bool casa::MomentClip< T >::doExclude_p [private]

Definition at line 642 of file MomentCalculator.h.

template<class T >
Bool casa::MomentClip< T >::doInclude_p [private]

Definition at line 642 of file MomentCalculator.h.

template<class T >
ImageMoments<T>& casa::MomentClip< T >::iMom_p [private]

Definition at line 635 of file MomentCalculator.h.

template<class T >
LogIO casa::MomentClip< T >::os_p [private]

Definition at line 636 of file MomentCalculator.h.

template<class T >
Lattice<T>* casa::MomentClip< T >::pAncilliaryLattice_p [private]

Definition at line 630 of file MomentCalculator.h.

template<class T >
const Vector<T>* casa::MomentClip< T >::pProfileSelect_p [private]

Definition at line 638 of file MomentCalculator.h.

template<class T >
Vector<T> casa::MomentClip< T >::range_p [private]

Definition at line 643 of file MomentCalculator.h.

template<class T >
Vector<T> casa::MomentClip< T >::selectedData_p [private]

Definition at line 640 of file MomentCalculator.h.

template<class T >
Vector<Int> casa::MomentClip< T >::selectedDataIndex_p [private]

Definition at line 641 of file MomentCalculator.h.

template<class T >
IPosition casa::MomentClip< T >::sliceShape_p [private]

Definition at line 644 of file MomentCalculator.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines