[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
|
LastValueFunctor [Functors To Inspect Images] |
![]() |
Stores and returns the last value it has seen. More...
#include <vigra/inspectimage.hxx>
Public Types | |
| typedef VALUETYPE | argument_type |
| typedef VALUETYPE | result_type |
| typedef VALUETYPE | value_type |
Public Member Functions | |
| LastValueFunctor (argument_type const &initial=argument_type()) | |
| result_type const & | operator() () const |
| void | operator() (argument_type const &v) |
| void | operator= (argument_type const &v) |
| void | reset () |
Public Attributes | |
| VALUETYPE | value |
This Functor is best used in conjunction with ArrayOfRegionStatistics to realize a look-up table.
Traits defined:
FunctorTraits::isUnaryAnalyser and FunctorTraits::isInitializer are true (VigraTrueType)
Usage:
#include <vigra/inspectimage.hxx>
Namespace: vigra
vigra::BImage img; vigra::ArrayOfRegionStatistics<LastValueFunctor<unsigned char> > lut(255); for(int i=0; i<256; ++i) { lut[i] = ...; // init look-up table } vigra::transformImage(srcImageRange(img), destImage(img), lut);
| typedef VALUETYPE argument_type |
the functor's argument type
| typedef VALUETYPE result_type |
the functor's result type
| typedef VALUETYPE value_type |
| LastValueFunctor | ( | argument_type const & | initial = argument_type() |
) |
default construction of value (i.e. builtin types will be set to zero)
| result_type const& operator() | ( | ) | const |
return current value
| void operator() | ( | argument_type const & | v | ) |
replace value
| void operator= | ( | argument_type const & | v | ) |
replace value
| void reset | ( | ) |
reset to initial value (the same as after default construction)
| VALUETYPE value |
the current value
|
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|