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

details LastValueFunctor< VALUETYPE > Class Template Reference VIGRA

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())
 
void operator() (argument_type const &v)
 
result_type const & operator() () const
 
void operator= (argument_type const &v)
 
void reset ()
 

Public Attributes

VALUETYPE value
 

Detailed Description

template<class VALUETYPE>
class vigra::LastValueFunctor< VALUETYPE >

Stores and returns the last value it has seen.

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

for(int i=0; i<256; ++i)
{
lut[i] = ...; // init look-up table
}
vigra::transformImage(srcImageRange(img), destImage(img), lut);

Member Typedef Documentation

typedef VALUETYPE argument_type

the functor's argument type

typedef VALUETYPE result_type

the functor's result type

typedef VALUETYPE value_type
Deprecated:
use argument_type and result_type

Constructor & Destructor Documentation

LastValueFunctor ( argument_type const &  initial = argument_type())

default construction of value (i.e. builtin types will be set to zero)

Member Function Documentation

void operator= ( argument_type const &  v)

replace value

void reset ( )

reset to initial value (the same as after default construction)

void operator() ( argument_type const &  v)

replace value

result_type const& operator() ( ) const

return current value

Member Data Documentation

VALUETYPE value

the current value


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.11.1 (Fri May 19 2017)