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 reference = dip::sint
The type of a reference, but we don’t return by reference, it’s just as easy to copy.
using value_type = dip::sint
The value obtained by dereferencing is an offset.

Functions

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

Operators

auto operator bool() const -> bool explicit
Test to see if the iterator is still pointing at a pixel.
auto operator!=(dip::PixelTableOffsets::iterator const& other) const -> bool
Inequality comparison.
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.

Alias documentation

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.

Function documentation

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.

static dip::PixelTableOffsets::iterator end( dip::PixelTableOffsets const& pt)

Constructs an end iterator.

void swap( dip::PixelTableOffsets::iterator& other) noexcept

Swap.

dip::PixelTableOffsets::iterator::reference Offset( ) const

Get offset, identical to dereferencing.

dip::uint Index( ) const

Get index within run.

bool IsAtEnd( ) const

Test to see if the iterator reached past the last pixel.

bool operator==( dip::PixelTableOffsets::iterator const& other) const

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.

bool operator!=( dip::PixelTableOffsets::iterator const& other) const

Inequality comparison.

bool operator bool( ) const explicit

Test to see if the iterator is still pointing at a pixel.