[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
![]() |
FindMinMax [Functors To Inspect Images] |
![]() |
Find the minimum and maximum pixel value in an image or ROI. More...
#include <vigra/inspectimage.hxx>
Public Types | |
typedef VALUETYPE | argument_type |
typedef VALUETYPE | result_type |
typedef VALUETYPE | value_type |
Public Member Functions | |
FindMinMax () | |
void | operator() (FindMinMax const &v) |
void | operator() (RGBValue< VALUETYPE > const &v) |
void | operator() (argument_type const &v) |
void | reset () |
Public Attributes | |
unsigned int | count |
VALUETYPE | max |
VALUETYPE | min |
In addition the size of the ROI is calculated. These functors can also be used in conjunction with ArrayOfRegionStatistics to find the extremes of all regions in a labeled image.
Traits defined:
FunctorTraits::isUnaryAnalyser
is true (VigraTrueType
)
Usage:
#include <vigra/inspectimage.hxx>
Namespace: vigra
vigra::BImage img; vigra::FindMinMax<vigra::BImage::PixelType> minmax; // init functor vigra::inspectImage(srcImageRange(img), minmax); cout << "Min: " << minmax.min << " Max: " << minmax.max;
Required Interface:
VALUETYPE v1, v2(v1); v1 < v2; v1 = v2;
typedef VALUETYPE argument_type |
the functor's argument type
typedef VALUETYPE result_type |
the functor's result type
typedef VALUETYPE value_type |
FindMinMax | ( | ) |
init min and max
void operator() | ( | FindMinMax< VALUETYPE > const & | v | ) |
merge two statistics
void operator() | ( | RGBValue< VALUETYPE > const & | v | ) |
update min and max with components of RGBValue<VALUETYPE>
void operator() | ( | argument_type const & | v | ) |
update min and max
void reset | ( | ) |
(re-)init functor (clear min, max)
unsigned int count |
the number of values processed so far
VALUETYPE max |
the current max
VALUETYPE min |
the current min
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|