[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
MultiImageAccessor2< Iter1, Acc1, Iter2, Acc2 > Class Template Reference |
Access two images simultaneously. More...
#include <vigra/accessor.hxx>
Public Types | |
typedef pair< typename Acc1::value_type, typename Acc2::value_type > | value_type |
Public Member Functions | |
MultiImageAccessor2 (Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) | |
template<class OFFSET > | |
value_type | operator() (OFFSET const &d) const |
template<class OFFSET1 , class OFFSET2 > | |
value_type | operator() (OFFSET1 d1, OFFSET2 const &d2) const |
Access two images simultaneously.
This accessor is used when two images need to be treated as one because an algorithm accepts only one image. For example, seededRegionGrowing() uses only one image two calculate the cost for aggregating each pixel into a region. Sometimes, we need more information to calculate this cost, for example gray value and local gradient magnitude. These values can be stored in two images, which appear as only one when we pass a MultiImageAccessor2
to the algorithms. Of course, the cost functor must accept a pair
of values for this to work. Instead of an actual image iterator, we pass a CoordinateIterator which selects the right pixels form both images.
Usage:
#include <vigra/accessor.hxx>
Namespace: vigra
typedef pair<typename Acc1::value_type, typename Acc2::value_type> value_type |
The accessors value_type: construct a pair that contains the corresponding image values.
MultiImageAccessor2 | ( | Iter1 | i1, |
Acc1 | a1, | ||
Iter2 | i2, | ||
Acc2 | a2 | ||
) |
Construct from two image iterators and associated accessors.
value_type operator() | ( | OFFSET const & | d | ) | const |
read the current data item
value_type operator() | ( | OFFSET1 | d1, |
OFFSET2 const & | d2 | ||
) | const |
read the data item at an offset
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|