[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]
![]() |
MultiImageAccessor2 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 Methods | |
MultiImageAccessor2 (Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) | |
template<class DIFFERENCE> value_type | operator() (DIFFERENCE const &d) const |
template<class DIFFERENCE1, class DIFFERENCE2> value_type | operator() (DIFFERENCE1 const &d1, DIFFERENCE2 const &d2) const |
Detailed Description |
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. Somtimes, we need more information to calcuate 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 lagorithms. 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
using namespace vigra; FImage gray_values(w,h), gradient_magnitude(w,h); IImage seeds(w,h), labels(w,h); seededRegionGrowing( srcIterRange(CoordinateIterator(), CoordinateIterator(w,h), MultiImageAccessor2<FImage::iterator, FImage::Accessor, FImage::iterator, FImage::Accessor> (gray_values.upperLeft(), gray_values.accessor(), gradient_magnitude.upperLeft(), gradient_magnitude.accessor())), srcImage(seeds), destImage(labels), SomeCostFunctor());
|
The accessors value_type: construct a pair that contains the corresponding image values. |
|
Construct from two image iterators and associated accessors. |
|
read the data item at an offset |
|
read the current data item |
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|