diplib/generic_iterators.h file

Defines image iterators that are independent of image data type. See Iterators.

Contents

Classes

class dip::BresenhamLineIterator
An iterator to iterate over pixels along a straight line.
template<typename T = dip::dfloat>
class dip::GenericImageIterator
A data-type–agnostic version of dip::ImageIterator. Use this iterator only to write code that does not know at compile-time what the data type of the image is.
template<dip::uint N, typename T = dip::dfloat>
class dip::GenericJointImageIterator
A data-type–agnostic version of dip::JointImageIterator. Use this iterator only to write code that does not know at compile-time what the data type of the image is.
class dip::ImageSliceIterator
An iterator for slice-by-slice processing of an image. Use it to process a multi-dimensional image as a series of lower-dimensional images.

Functions

auto dip::ImageSliceEndIterator(dip::Image const& image, dip::uint procDim) -> dip::ImageSliceIterator
Constructs an end iterator corresponding to a dip::ImageSliceIterator
auto dip::ImageTensorIterator(dip::Image const& image) -> dip::ImageSliceIterator
An iterator for element-by-element processing of a tensor image. Use it to process a tensor image as a series of scalar images.

Operators

auto dip::operator+(dip::ImageSliceIterator it, dip::sint n) -> dip::ImageSliceIterator
Increment an image slice iterator by n
auto dip::operator+(dip::ImageSliceIterator it, dip::uint n) -> dip::ImageSliceIterator
Increment an image slice iterator by n
auto dip::operator-(dip::ImageSliceIterator it, dip::sint n) -> dip::ImageSliceIterator
Decrement an image slice iterator by n, but never moves the iterator to before the first slide
auto dip::operator-(dip::ImageSliceIterator it, dip::uint n) -> dip::ImageSliceIterator
Decrement an image slice iterator by n, but never moves the iterator to before the first slide