dip::PixelTableOffsets::iterator class

An iterator that visits each of the neighborhood’s pixels in turn.

Dereferencing the iterator returns an offset. Satisfies the requirements for ForwardIterator.

Constructors, destructors, assignment and conversion operators

iterator() defaulted
Default constructor yields an invalid iterator that cannot be dereferenced.
iterator(dip::PixelTableOffsets const& pt) explicit
Constructs an iterator to the first pixel in the neighborhood.

Aliases

using iterator_category = std::forward_iterator_tag
Iterator category.
using value_type = dip::sint
The value obtained by dereferencing is an offset.
using reference = dip::sint
The type of a reference, but we don’t return by reference, it’s just as easy to copy.

Functions

static auto end(dip::PixelTableOffsets const& pt) -> dip::PixelTableOffsets::iterator
Constructs an end iterator.
void swap(dip::PixelTableOffsets::iterator& other) noexcept
Swap.
auto Offset() const -> dip::PixelTableOffsets::iterator::reference
Get offset, identical to dereferencing.
auto Index() const -> dip::uint
Get index within run.
auto IsAtEnd() const -> bool
Test to see if the iterator reached past the last pixel.

Operators

auto operator*() const -> dip::PixelTableOffsets::iterator::reference
Dereference.
auto operator++() -> dip::PixelTableOffsets::iterator&
Pre-increment.
auto operator++(int ) -> dip::PixelTableOffsets::iterator
Post-increment.
auto operator==(dip::PixelTableOffsets::iterator const& other) const -> bool
Equality comparison, is true if the two iterators reference the same pixel in the same pixel table, even if they use the strides of different images.
auto operator!=(dip::PixelTableOffsets::iterator const& other) const -> bool
Inequality comparison.
auto operator bool() const -> bool explicit
Test to see if the iterator is still pointing at a pixel.