[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
ArrayOfRegionStatistics< RegionStatistics, LabelType > Class Template Reference |
Calculate statistics for all regions of a labeled image. More...
#include <vigra/inspectimage.hxx>
Inherits get_extra_passes< RegionStatistics >.
Public Types | |
typedef LabelType | argument_type |
typedef RegionArray::const_iterator | const_iterator |
typedef RegionStatistics const & | const_reference |
typedef RegionStatistics::argument_type | first_argument_type |
typedef RegionArray::iterator | iterator |
typedef RegionStatistics & | reference |
typedef RegionStatistics::result_type | result_type |
typedef LabelType | second_argument_type |
typedef RegionStatistics | value_type |
Public Member Functions | |
ArrayOfRegionStatistics () | |
ArrayOfRegionStatistics (unsigned int max_region_label) | |
iterator | begin () |
const_iterator | begin () const |
void | calc_sync () |
iterator | end () |
const_iterator | end () const |
unsigned int | maxRegionLabel () const |
void | merge (argument_type label1, argument_type label2) |
void | operator() (first_argument_type const &v, second_argument_type label) |
result_type | operator() (argument_type label) const |
const_reference | operator[] (argument_type label) const |
reference | operator[] (argument_type label) |
void | reset () |
void | resize (unsigned int max_region_label) |
unsigned int | size () const |
Calculate statistics for all regions of a labeled image.
This Functor encapsulates an array of statistics functors, one for each label, and selects the one to be updated according to the pixel's label.
Traits defined:
FunctorTraits::isBinaryAnalyser
and FunctorTraits::isUnaryFunctor
are true (VigraTrueType
)
Usage:
#include <vigra/inspectimage.hxx>
Namespace: vigra
Required Interface:
typedef RegionStatistics::argument_type first_argument_type |
argument type of the contained statistics object becomes first argument of the analyser
typedef LabelType second_argument_type |
label type is used to determine the region to be updated
typedef LabelType argument_type |
label type is also used to determine the region to be returned by the 1 argument operator()
typedef RegionStatistics::result_type result_type |
result type of the contained statistics object becomes result type of the analyser
typedef RegionStatistics value_type |
the value type of the array: the contained statistics object. Note: this definition was different in older VIGRA versions. The old definition was wrong.
typedef RegionStatistics& reference |
the array's reference type
typedef RegionStatistics const& const_reference |
the array's const reference type
typedef RegionArray::iterator iterator |
type to iterate over the statistics array
typedef RegionArray::const_iterator const_iterator |
type to iterate over a const statistics array
init array of RegionStatistics with default size 0.
ArrayOfRegionStatistics | ( | unsigned int | max_region_label | ) |
init array of RegionStatistics with index domain 0...max_region_label.
void resize | ( | unsigned int | max_region_label | ) |
resize array to new index domain 0...max_region_label. All bin are re-initialized.
void reset | ( | ) |
reset the contained functors to their initial state.
void operator() | ( | first_argument_type const & | v, |
second_argument_type | label | ||
) |
update regions statistics for region label
. The label type is converted to unsigned int
.
void merge | ( | argument_type | label1, |
argument_type | label2 | ||
) |
merge second region into first
unsigned int maxRegionLabel | ( | ) | const |
ask for maximal index (label) allowed
unsigned int size | ( | ) | const |
ask for array size (i.e. maxRegionLabel() + 1)
result_type operator() | ( | argument_type | label | ) | const |
access the statistics for a region via its label. The label type is converted to unsigned int
.
const_reference operator[] | ( | argument_type | label | ) | const |
read the statistics functor for a region via its label
reference operator[] | ( | argument_type | label | ) |
access the statistics functor for a region via its label
iterator begin | ( | ) |
iterator to the begin of the region array
const_iterator begin | ( | ) | const |
const iterator to the begin of the region array
iterator end | ( | ) |
iterator to the end of the region array
const_iterator end | ( | ) | const |
const iterator to the end of the region array
void calc_sync | ( | ) |
prepare next pass for multi-pass RegionStatistics types
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|