[ VIGRA Homepage |
Class Index |
Function Index |
File Index |
Main Page ]
|
ArrayOfRegionStatistics Class Template Reference
|
 |
Calculate statistics for all regions of a labeled image.
More...
#include "vigra/inspectimage.hxx"
template<class RegionStatistics, class LabelType = int>
class vigra::ArrayOfRegionStatistics< RegionStatistics, LabelType >
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.
Usage:
#include "vigra/inspectimage.hxx"
Namespace: vigra
Required Interface:
RegionStatistics region;
RegionStatistics::argument_type a;
RegionStatistics::result_type r;
region(a);
r = region();
- Examples:
-
voronoi.cxx, and watershed.cxx.
Member Typedef Documentation
typedef LabelType argument_type
|
|
|
label type is also used to determine the region to be returned by the 1 argument operator() |
typedef RegionArray::const_iterator const_iterator
|
|
|
type to iterate over a const statistics array |
typedef RegionStatistics const& const_reference
|
|
|
the array's const reference type |
typedef RegionStatistics::argument_type first_argument_type
|
|
|
argument type of the contained statistics object becomes first argument of the analyser |
typedef RegionArray::iterator iterator
|
|
|
type to iterate over the statistics array |
typedef RegionStatistics& reference
|
|
|
the array's reference type |
typedef RegionStatistics::result_type result_type
|
|
|
result type of the contained statistics object becomes result type of the analyser |
typedef LabelType second_argument_type
|
|
|
label type is used to determine the region to be updated |
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. |
Constructor & Destructor Documentation
ArrayOfRegionStatistics |
( |
|
) |
[inline] |
|
|
init array of RegionStatistics with default size 0. |
ArrayOfRegionStatistics |
( |
unsigned int |
max_region_label |
) |
[inline] |
|
|
init array of RegionStatistics with index domain 0...max_region_label. |
Member Function Documentation
|
const iterator to the begin of the region array |
|
iterator to the begin of the region array |
|
const iterator to the end of the region array |
|
iterator to the end of the region array |
unsigned int maxRegionLabel |
( |
|
) |
const [inline] |
|
|
ask for maximal index (label) allowed |
|
merge second region into first |
|
access the statistics for a region via its label. The label type is converted to unsigned int . |
|
update regions statistics for region label . The label type is converted to unsigned int . |
|
access the statistics functor for a region via its label |
|
read the statistics functor for a region via its label |
|
reset the contained functors to their initial state. |
void resize |
( |
unsigned int |
max_region_label |
) |
[inline] |
|
|
resize array to new index domain 0...max_region_label. All bin are re-initialized. |
unsigned int size |
( |
|
) |
const [inline] |
|
The documentation for this class was generated from the following file: