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

details LastValueFunctor 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 Methods

 LastValueFunctor ()
void operator= (argument_type const &v)
void reset ()
void operator() (argument_type const &v)
result_type const & operator() () const

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

    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);


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   [inline]

 

default initialization of value


Member Function Documentation


result_type const& operator()   const [inline]

 

return current value


void operator() argument_type const &    v [inline]

 

replace value


void operator= argument_type const &    v [inline]

 

replace value


void reset   [inline]

 

reset to initiaö value


Member Data Documentation


VALUETYPE value

 

the current value


The documentation for this class was generated from the following file:

© Ullrich Köthe (koethe@informatik.uni-hamburg.de)
Cognitive Systems Group, University of Hamburg, Germany

html generated using doxygen and Python
VIGRA 1.3.2 (27 Jan 2005)