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

| StandardConstValueAccessor< VALUETYPE > Class Template Reference Data Accessors |

Encapsulate access to the values an iterator points to. More...

`#include <vigra/accessor.hxx>`

List of all members.

## Public Member Functions

template<class ITERATOR >
VALUETYPE | operator() (ITERATOR const &i) const
template<class ITERATOR , class DIFFERENCE >
VALUETYPE | operator() (ITERATOR const &i, DIFFERENCE const &diff) const

## Detailed Description

### template<class VALUETYPE>
class vigra::StandardConstValueAccessor< VALUETYPE >

Encapsulate access to the values an iterator points to.

StandardConstValueAccessor is a trivial accessor that simply encapsulates the iterator's operator*() and operator[]() in its read functions. It passes its arguments by value. If the iterator returns its items by reference (such as vigra::ConstImageIterator), you can also use StandardConstAccessor. These accessors have different optimization properties -- StandardConstAccessor is usually faster for compound pixel types, while StandardConstValueAccessor is faster for the built-in types.

When an iterator passes a floating point number to an accessor with integral value_type, the value is rounded and clipped as appropriate.

#include <vigra/accessor.hxx>
Namespace: vigra

## Member Function Documentation

VALUETYPE operator() | ( | ITERATOR const & | i | ) | const

Read the current data item. The type `ITERATOR::reference` is automatically converted to `VALUETYPE`. In case of a conversion floating point -> integral this includes rounding and clipping.

VALUETYPE operator() | ( | ITERATOR const & | i,
|  | DIFFERENCE const & | diff
| ) |  | const

Read the data item at an offset (can be 1D or 2D or higher order difference). The type `ITERATOR::index_reference` is automatically converted to `VALUETYPE`. In case of a conversion floating point -> integral this includes rounding and clipping.

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

- vigra/accessor.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.9.0 (Tue Nov 6 2012)