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

DynamicAccumulatorChain< T, Selected > Class Template Reference

Create a dynamic accumulator chain containing the selected statistics and their dependencies. More...

#include <vigra/accumulator.hxx>

Inheritance diagram for DynamicAccumulatorChain< T, Selected >:
AccumulatorChain< T, Selected, true >

Public Member Functions

template<class TAG >
void activate ()
 
void activate (std::string tag)
 
void activateAll ()
 
ArrayVector< std::string > activeNames () const
 
template<class TAG >
bool isActive () const
 
bool isActive (std::string tag) const
 
unsigned int passesRequired () const
 
- Public Member Functions inherited from AccumulatorChain< T, Selected, true >
void merge (AccumulatorChainImpl const &o)
 
void operator+= (AccumulatorChainImpl const &o)
 
unsigned int passesRequired () const
 
void reset (unsigned int reset_to_pass=0)
 
void reshape (TinyVector< U, N > const &s)
 
void setCoordinateOffset (SHAPE const &offset)
 
void setHistogramOptions (HistogramOptions const &options)
 
void updatePassN (T const &t, double weight, unsigned int N)
 
void updatePassN (T const &t, unsigned int N)
 

Additional Inherited Members

- Public Types inherited from AccumulatorChain< T, Selected, true >
- Static Public Member Functions inherited from AccumulatorChain< T, Selected, true >
static ArrayVector< std::string > const & tagNames ()
 

Detailed Description

template<class T, class Selected>
class vigra::acc::DynamicAccumulatorChain< T, Selected >

Create a dynamic accumulator chain containing the selected statistics and their dependencies.

DynamicAccumulatorChain is used to compute global statistics with run-time activation. A set of statistics is selected at run-time and from this set statistics can be activated at run-time by calling activate<stat>() or activate(std::string stat).

The template parameters are as follows:

  • T: The input type
    • either element type of the data(e.g. double, int, RGBValue, ...)
    • or type of CoupledHandle (for access to coordinates and/or weights)
  • Selected: statistics to be computed and index specifier for the CoupledHandle, wrapped with Select

Usage:

typedef double DataType;
DynamicAccumulatorChain<DataType, Select<Variance, Mean, Minimum, ...> > accumulator;
Create a dynamic accumulator chain containing the selected statistics and their dependencies.
Definition accumulator.hxx:2159
Basic statistic. Minimum value.
Definition accumulator.hxx:5129
DivideByCount< Sum > Mean
Alias. Mean.
Definition accumulator-grammar.hxx:173
DivideByCount< Central< PowerSum< 2 > > > Variance
Alias. Variance.
Definition accumulator-grammar.hxx:195
Wrapper for MakeTypeList that additionally performs tag standardization.
Definition accumulator.hxx:408

Usage, using CoupledHandle:

const int dim = 3; //dimension of MultiArray
typedef double DataType;
typedef double WeightType;
Specifies index of data in CoupledHandle.
Definition accumulator.hxx:3481
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

◆ activate() [1/2]

template<class T , class Selected >
void activate ( std::string tag)

Activate statistic 'tag'. Alias names are not recognized. If the statistic is not in the accumulator chain a PreconditionViolation is thrown.

◆ activate() [2/2]

template<class T , class Selected >
template<class TAG >
void activate ( )

activate<TAG>() activates statistic 'TAG'. If the statistic is not in the accumulator chain it is ignored. (?)

◆ activateAll()

template<class T , class Selected >
void activateAll ( )

Activate all statistics in the accumulator chain.

◆ isActive() [1/2]

template<class T , class Selected >
bool isActive ( std::string tag) const

Return true if the statistic 'tag' is active, i.e. activate(std::string tag) or activate<TAG>() has been called. If the statistic is not in the accumulator chain a PreconditionViolation is thrown. (Note that alias names are not recognized.)

◆ isActive() [2/2]

template<class T , class Selected >
template<class TAG >
bool isActive ( ) const

isActive<TAG>() returns true if statistic 'TAG' is active, i.e. activate(std::string tag) or activate<TAG>() has been called. If the statistic is not in the accumulator chain, true is returned. (?)

◆ activeNames()

template<class T , class Selected >
ArrayVector< std::string > activeNames ( ) const

Return names of all statistics in the accumulator chain that are active.

◆ passesRequired()

template<class T , class Selected >
unsigned int passesRequired ( ) const

Return number of passes required to compute the active statistics in the accumulator chain.


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.2