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

| AccumulatorChainArray< T, Selected, dynamic > Class Template Reference |

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

`#include <vigra/accumulator.hxx>`

List of all members.

## Public Member Functions
void | ignoreLabel (MultiArrayIndex l)
MultiArrayIndex | maxRegionLabel () const
void | merge (unsigned i, unsigned j)
void | merge (AccumulatorChainArray const &o)
template<class ArrayLike >
void | merge (AccumulatorChainArray const &o, ArrayLike const &labelMapping)
void | operator+= (AccumulatorChainImpl const &o)
unsigned int | regionCount () const
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, unsigned int N)
void | updatePassN (T const &t, double weight, unsigned int N)
## Static Public Member Functions
static ArrayVector < std::string > const & | tagNames ()

## 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:

- T: The input type, type of CoupledHandle (for access to coordinates, labels and weights)
- Selected: statistics to be computed and index specifier for the CoupledHandle, wrapped with Select

Usage:

        const int dim = 3; //dimension of MultiArray
        typedef double DataType;
        typedef double WeightType;
        typedef unsigned int LabelType;
        typedef vigra::CoupledIteratorType<dim, DataType, WeightType, LabelType>::HandleType Handle;
        AccumulatorChainArray<Handle, Select<DataArg<1>, WeightArg<2>, LabelArg<3>, Mean, Variance, ...> > a;

See Feature Accumulators for more information and examples of use.

## Member Function Documentation

void ignoreLabel | ( | MultiArrayIndex | l | ) |

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

void setMaxRegionLabel | ( | unsigned | label | ) |

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

MultiArrayIndex maxRegionLabel | ( |  | ) | const

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

unsigned int regionCount | ( |  | ) | const

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

void merge | ( | unsigned | i,
|  | unsigned | j
| ) |  |

Merge region i with region j.

void merge | ( | AccumulatorChainArray< T, Selected, dynamic > const & | o | ) |

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

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().

static ArrayVector<std::string> const& tagNames | ( |  | ) | `[static]`

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

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.

void setHistogramOptions | ( | HistogramOptions const & | regionoptions,
|  | HistogramOptions const & | globaloptions
| ) |  |

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

void reset | ( | unsigned int | reset_to_pass = `0` | ) |

Reset current_pass_ of the accumulator chain to 'reset_to_pass'.

void operator+= | ( | AccumulatorChainImpl const & | o | ) |

Equivalent to merge(o) .

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.

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:

- vigra/accumulator.hxx

© 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.9.0 (Tue Nov 6 2012)