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

Public Types | Public Member Functions | Public Attributes | List of all members
LastValueFunctor< VALUETYPE > Class Template Reference

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

## 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);
vigra::ArrayOfRegionStatistics
Calculate statistics for all regions of a labeled image.
Definition inspectimage.hxx:2079
vigra::transformImage
void transformImage(...)
Apply unary point transformation to each pixel.
vigra::BImage
BasicImage< UInt8 > BImage
Definition stdimage.hxx:62

## Member Typedef Documentation

## ◆ argument_type

template<class VALUETYPE>

typedef VALUETYPE argument_type

the functor's argument type

## ◆ result_type

template<class VALUETYPE>

typedef VALUETYPE result_type

the functor's result type

## ◆ value_type

template<class VALUETYPE>

typedef VALUETYPE value_type

Deprecated
  use argument_type and result_type

## Constructor & Destructor Documentation

## ◆ LastValueFunctor()

template<class VALUETYPE>

LastValueFunctor | ( | argument_type const & | initial = argument_type() | ) |

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

## Member Function Documentation

## ◆ operator=()

template<class VALUETYPE>

void operator= | ( | argument_type const & | v | ) |

replace value

## ◆ reset()

template<class VALUETYPE>

void reset | ( |  | ) |

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

## ◆ operator()() [1/2]

template<class VALUETYPE>

void operator() | ( | argument_type const & | v | ) |

replace value

## ◆ operator()() [2/2]

template<class VALUETYPE>

result_type const & operator() | ( |  | ) | const

return current value

## Member Data Documentation

## ◆ value

template<class VALUETYPE>

VALUETYPE value

the current value

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

- vigra/inspectimage.hxx

© 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.12.4