[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

AccumulatorChainArray< T, Selected, dynamic > Class Template Referenceabstract

Create an array of accumulator chains containing the selected per-region and global statistics and their dependencies. More...

#include <vigra/accumulator.hxx>

Inheritance diagram for AccumulatorChainArray< T, Selected, dynamic >:
DynamicAccumulatorChainArray< CoupledArrays< N, T1, T2, T3, T4, T5 >::HandleType, Selected >

Public Member Functions

MultiArrayIndex ignoredLabel () const
 
void ignoreLabel (MultiArrayIndex l)
 
MultiArrayIndex maxRegionLabel () const
 
void merge (AccumulatorChainArray const &o)
 
template<class ArrayLike >
void merge (AccumulatorChainArray const &o, ArrayLike const &labelMapping)
 
void merge (unsigned i, unsigned j)
 
void operator+= (AccumulatorChainArray const &o)
 
void operator+= (AccumulatorChainImpl const &o)
 
unsigned int regionCount () const
 
template<class SHAPE >
void setCoordinateOffset (MultiArrayIndex k, SHAPE const &offset)
 
template<class SHAPE >
void setCoordinateOffset (SHAPE const &offset) void reset(unsigned int reset_to_pass=0)
 
void setHistogramOptions (HistogramOptions const &options)
 
void setHistogramOptions (HistogramOptions const &regionoptions, HistogramOptions const &globaloptions)
 
void setMaxRegionLabel (unsigned label)
 
void updatePassN (T const &t, double weight, unsigned int N)
 
void updatePassN (T const &t, unsigned int N)
 

Static Public Member Functions

static ArrayVector< std::string > consttagNames ()
 

Detailed Description

template<class T, class Selected, bool dynamic = false>
class vigra::acc::AccumulatorChainArray< T, Selected, dynamic >

Create an array of accumulator chains containing the selected per-region and global statistics and their dependencies.

AccumulatorChainArray is used to compute per-region statistics (as well as global statistics). The statistics are selected at compile-time. An array of accumulator chains (one per region) for region statistics is created and one accumulator chain for global statistics. The region labels always start at 0. Use the Global modifier to compute global statistics (by default per-region statistics are computed).

The template parameters are as follows:

Usage:

const int dim = 3; //dimension of MultiArray
typedef double DataType;
typedef double WeightType;
typedef unsigned int LabelType;
Class for a single RGB value.
Definition rgbvalue.hxx:128
DivideByCount< Sum > Mean
Alias. Mean.
Definition accumulator-grammar.hxx:173
DivideByCount< Central< PowerSum< 2 > > > Variance
Alias. Variance.
Definition accumulator-grammar.hxx:195
CoupledHandleType< N, T1, T2, T3, T4, T5 >::type HandleType
Definition multi_iterator_coupled.hxx:719

See Feature Accumulators for more information and examples of use.

Member Function Documentation

◆ ignoreLabel()

template<class T , class Selected , bool dynamic = false>
void ignoreLabel ( MultiArrayIndex  l)

Statistics will not be computed for label l. Note that only one label can be ignored.

◆ ignoredLabel()

template<class T , class Selected , bool dynamic = false>
MultiArrayIndex ignoredLabel ( ) const

Ask for a label to be ignored. Default: -1 (meaning that no label is ignored).

◆ setMaxRegionLabel()

template<class T , class Selected , bool dynamic = false>
void setMaxRegionLabel ( unsigned  label)

Set the maximum region label (e.g. for merging two accumulator chains).

◆ maxRegionLabel()

template<class T , class Selected , bool dynamic = false>
MultiArrayIndex maxRegionLabel ( ) const

Maximum region label. (equal to regionCount() - 1)

◆ regionCount()

template<class T , class Selected , bool dynamic = false>
unsigned int regionCount ( ) const

Number of Regions. (equal to maxRegionLabel() + 1)

◆ operator+=() [1/2]

template<class T , class Selected , bool dynamic = false>
void operator+= ( AccumulatorChainArray< T, Selected, dynamic > const o)

Equivalent to merge(o).

◆ merge() [1/3]

template<class T , class Selected , bool dynamic = false>
void merge ( unsigned  i,
unsigned  j 
)

Merge region i with region j.

◆ merge() [2/3]

template<class T , class Selected , bool dynamic = false>
void merge ( AccumulatorChainArray< T, Selected, dynamic > const o)

Merge with accumulator chain o. maxRegionLabel() of the two accumulators must be equal.

◆ merge() [3/3]

template<class T , class Selected , bool dynamic = false>
template<class ArrayLike >
void merge ( AccumulatorChainArray< T, Selected, dynamic > const o,
ArrayLike const labelMapping 
)

Merge with accumulator chain o using a mapping between labels of the two accumulators. Label l of accumulator chain o is mapped to labelMapping[l]. Hence, all elements of labelMapping must be <= maxRegionLabel() and size of labelMapping must match o.regionCount().

◆ tagNames()

template<class T , class Selected , bool dynamic = false>
static ArrayVector< std::string > const & tagNames ( )
static

Return names of all tags in the accumulator chain (selected statistics and their dependencies).

◆ setCoordinateOffset() [1/2]

template<class T , class Selected , bool dynamic = false>
template<class SHAPE >
void setCoordinateOffset ( MultiArrayIndex  k,
SHAPE const offset 
)

Set an offset for Coord<...> statistics for region k.

If the offset is non-zero, coordinate statistics such as RegionCenter are computed in the global coordinate system defined by the offset. Without an offset, these statistics are computed in the local coordinate system of the current region of interest.

◆ setHistogramOptions() [1/2]

template<class T , class Selected , bool dynamic = false>
void setHistogramOptions ( HistogramOptions const options)

Set options for all histograms in the accumulator chain. See histogram accumulators for possible options. The function is ignored if there is no histogram in the accumulator chain.

◆ setHistogramOptions() [2/2]

template<class T , class Selected , bool dynamic = false>
void setHistogramOptions ( HistogramOptions const regionoptions,
HistogramOptions const globaloptions 
)

Set regional and global options for all histograms in the accumulator chain.

◆ setCoordinateOffset() [2/2]

template<class T , class Selected , bool dynamic = false>
template<class SHAPE >
void setCoordinateOffset ( SHAPE const offset)
pure virtual

Set an offset for Coord<...> statistics.

If the offset is non-zero, coordinate statistics such as RegionCenter are computed in the global coordinate system defined by the offset. Without an offset, these statistics are computed in the local coordinate system of the current region of interest.

Reset current_pass_ of the accumulator chain to 'reset_to_pass'.

◆ operator+=() [2/2]

template<class T , class Selected , bool dynamic = false>
void operator+= ( AccumulatorChainImpl const o)

Equivalent to merge(o) .

◆ updatePassN() [1/2]

template<class T , class Selected , bool dynamic = false>
void updatePassN ( T const t,
unsigned int  N 
)

Upate all accumulators in the accumulator chain that work in pass N with data t. Requirement: 0 < N < 6 and N >= current_pass_ . If N < current_pass_ call reset first.

◆ updatePassN() [2/2]

template<class T , class Selected , bool dynamic = false>
void updatePassN ( T const t,
double  weight,
unsigned int  N 
)

Upate all accumulators in the accumulator chain that work in pass N with data t and weight. Requirement: 0 < N < 6 and N >= current_pass_ . If N < current_pass_ call reset first.


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

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de)
Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany

html generated using doxygen and Python
vigra 1.12.1