Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1HistTiledCollapser.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 23:06:58 2011 Кодировка: Поисковые слова: south pole |
Generate histograms, tile by tile, from a masked lattice. More...
#include <LatticeHistograms.h>
Public Member Functions | |
HistTiledCollapser (LatticeStatistics< T > *pStats, uInt nBins) | |
Constructor. | |
virtual void | init (uInt nOutPixelsPerCollapse) |
Initialize process, making some checks. | |
virtual void | initAccumulator (uInt n1, uInt n3) |
Initialize the accumulator. | |
virtual void | process (uInt accumIndex1, uInt accumIndex3, const T *inData, const Bool *inMask, uInt inIncr, uInt nrval, const IPosition &startPos, const IPosition &shape) |
Process the data in the current chunk. | |
virtual void | endAccumulator (Array< T > &result, Array< Bool > &resultMask, const IPosition &shape) |
End the accumulation process and return the result arrays. | |
virtual Bool | canHandleNullMask () const |
Can handle null mask. | |
Private Attributes | |
LatticeStatistics< T > * | pStats_p |
Block< T > * | pHist_p |
uInt | nBins_p |
uInt | n1_p |
uInt | n3_p |
Generate histograms, tile by tile, from a masked lattice.
Public interface
This class is used by LatticeHistograms
to generate histograms from an input MaskedLattice
. The input lattice is iterated through in tile-sized chunks and fed to an object of this class.
HistTiledCollapser
is derived from TiledCollapser
which is a base class used to define methods. Objects of this base class are used by LatticeApply
functions. In this particular case, we are interested in LatticeApply::tiledApply
. This function iterates through a MaskedLattice
and allows you to collapse one or more axes, computing some values from it, and placing those values into an output MaskedLattice
. It iterates through the input lattice in optimal tile-sized chunks. LatticeHistograms
uses a HistTiledCollapser
object which it gives to LatticeApply::tiledApply
for digestion. After it has done its work, LatticeHistograms
then accesses the output Lattice
that it made.
// Created collapser. Control information is passed in via the constructor. HistTiledCollapser<T> collapser(pStats, nBins_p); // This is the first output axis getting collapsed values. In LatticeHistograms // this is the first axis of the output lattice Int newOutAxis = 0; // tiledApply does the work by passing the collapser data in chunks // and by writing the results into the output lattice LatticeApply<T>::tiledApply(outLattice, inLattice, collapser, collapseAxes, newOutAxis);
In this example, a collapser is made and passed to LatticeApply. Afterwards, the output Lattice is available for use. The Lattices must all be the correct shapes on input to tiledApply
The LatticeApply classes enable the ugly details of optimal Lattice iteration to be hidden from the user.
Definition at line 455 of file LatticeHistograms.h.
casa::HistTiledCollapser< T >::HistTiledCollapser | ( | LatticeStatistics< T > * | pStats, | |
uInt | nBins | |||
) |
Constructor.
virtual Bool casa::HistTiledCollapser< T >::canHandleNullMask | ( | ) | const [inline, virtual] |
Can handle null mask.
Reimplemented from casa::TiledCollapser< T, T >.
Definition at line 484 of file LatticeHistograms.h.
virtual void casa::HistTiledCollapser< T >::endAccumulator | ( | Array< T > & | result, | |
Array< Bool > & | resultMask, | |||
const IPosition & | shape | |||
) | [virtual] |
End the accumulation process and return the result arrays.
Implements casa::TiledCollapser< T, T >.
virtual void casa::HistTiledCollapser< T >::init | ( | uInt | nOutPixelsPerCollapse | ) | [virtual] |
Initialize process, making some checks.
Implements casa::TiledCollapser< T, T >.
virtual void casa::HistTiledCollapser< T >::initAccumulator | ( | uInt | n1, | |
uInt | n3 | |||
) | [virtual] |
Initialize the accumulator.
Implements casa::TiledCollapser< T, T >.
virtual void casa::HistTiledCollapser< T >::process | ( | uInt | accumIndex1, | |
uInt | accumIndex3, | |||
const T * | inData, | |||
const Bool * | inMask, | |||
uInt | inIncr, | |||
uInt | nrval, | |||
const IPosition & | startPos, | |||
const IPosition & | shape | |||
) | [virtual] |
Process the data in the current chunk.
Implements casa::TiledCollapser< T, T >.
uInt casa::HistTiledCollapser< T >::n1_p [private] |
Definition at line 490 of file LatticeHistograms.h.
uInt casa::HistTiledCollapser< T >::n3_p [private] |
Definition at line 491 of file LatticeHistograms.h.
uInt casa::HistTiledCollapser< T >::nBins_p [private] |
Definition at line 489 of file LatticeHistograms.h.
Block<T>* casa::HistTiledCollapser< T >::pHist_p [private] |
Definition at line 488 of file LatticeHistograms.h.
LatticeStatistics<T>* casa::HistTiledCollapser< T >::pStats_p [private] |
Definition at line 484 of file LatticeHistograms.h.