[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]
![]() |
StridedImageIterator Class Template Reference | ![]() |
---|
Iterator to be used when pixels are to be skipped. More...
#include "vigra/imageiterator.hxx"
Inheritance diagram for StridedImageIterator:
Public Types | |
typedef Base::pointer | pointer |
typedef Base::difference_type | difference_type |
Public Methods | |
StridedImageIterator (pointer base, int ystride, int xskip, int yskip) | |
StridedImageIterator () |
Detailed Description |
This iterator can be used when some pixels shall be automatically skipped, for example if an image is to be sub-sampled: instead of advancing to the next pixel, ++iterator.x
jumps to the pixel at a horizontal offset of xskip
. Likewise with yskip
in vertical direction. Most functions and local types are inherited from ImageIteratorBase.
Usage:
BImage img(w,h); ... int xskip = 2, yskip = 2; int wskip = w / xskip + 1, hskip = h / yskip + 1; StridedImageIterator<BImage::value_type> upperLeft(&img(0,0), w, xskip, yskip); StridedImageIterator<BImage::value_type> lowerRight = upperLeft + Diff2D(wskip, hskip); // now navigation with upperLeft and lowerRight lets the image appear to have half // the original resolution in either dimension
#include "vigra/imageiterator.hxx"
Namespace: vigra
|
the iterator's difference type (argument type of Reimplemented from ImageIteratorBase< StridedImageIterator< PIXELTYPE >, PIXELTYPE, PIXELTYPE &, PIXELTYPE *, StridedArrayTag >. |
|
the iterator's pointer type (return type of Reimplemented from ImageIteratorBase< StridedImageIterator< PIXELTYPE >, PIXELTYPE, PIXELTYPE &, PIXELTYPE *, StridedArrayTag >. |
|
Construct from raw memory with a vertical stride of |
|
Default constructor |
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|