MorphologicalAttributeFilters
Public API documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
mmcfilters::AdjacencyRelation::IteratorAdjacency Class Reference

Lightweight iterator over the currently configured traversal. More...

#include <AdjacencyRelation.hpp>

Public Types

using iterator_category = std::input_iterator_tag
 Input-iterator category for range-based traversal.
 
using value_type = int
 Linear pixel index yielded by the iterator.
 

Public Member Functions

 IteratorAdjacency (AdjacencyRelation *obj, int id)
 Creates an iterator over obj at stencil position id.
 
AdjacencyRelationgetInstance ()
 Returns the adjacency relation currently being traversed.
 
IteratorAdjacencyoperator++ ()
 Advances to the next valid neighbour in the current traversal.
 
bool operator== (const IteratorAdjacency &other) const
 Returns true when both iterators point to the same stencil position.
 
bool operator!= (const IteratorAdjacency &other) const
 Returns true when the iterators point to different stencil positions.
 
int operator* () const
 Returns the current neighbour as a linear pixel index.
 

Detailed Description

Lightweight iterator over the currently configured traversal.

The iterator yields linear pixel indices and respects both image bounds and the optional forward-only mask.

Iterators hold a pointer to the parent AdjacencyRelation; incrementing any iterator advances the parent's mutable traversal cursor.

Definition at line 410 of file AdjacencyRelation.hpp.

Member Typedef Documentation

◆ iterator_category

Input-iterator category for range-based traversal.

Definition at line 417 of file AdjacencyRelation.hpp.

◆ value_type

Linear pixel index yielded by the iterator.

Definition at line 420 of file AdjacencyRelation.hpp.

Constructor & Destructor Documentation

◆ IteratorAdjacency()

mmcfilters::AdjacencyRelation::IteratorAdjacency::IteratorAdjacency ( AdjacencyRelation obj,
int  id 
)
inline

Creates an iterator over obj at stencil position id.

Definition at line 425 of file AdjacencyRelation.hpp.

Member Function Documentation

◆ getInstance()

AdjacencyRelation * mmcfilters::AdjacencyRelation::IteratorAdjacency::getInstance ( )
inline

Returns the adjacency relation currently being traversed.

Definition at line 430 of file AdjacencyRelation.hpp.

◆ operator!=()

bool mmcfilters::AdjacencyRelation::IteratorAdjacency::operator!= ( const IteratorAdjacency other) const
inline

Returns true when the iterators point to different stencil positions.

Definition at line 450 of file AdjacencyRelation.hpp.

◆ operator*()

int mmcfilters::AdjacencyRelation::IteratorAdjacency::operator* ( ) const
inline

Returns the current neighbour as a linear pixel index.

Definition at line 457 of file AdjacencyRelation.hpp.

◆ operator++()

IteratorAdjacency & mmcfilters::AdjacencyRelation::IteratorAdjacency::operator++ ( )
inline

Advances to the next valid neighbour in the current traversal.

Definition at line 435 of file AdjacencyRelation.hpp.

◆ operator==()

bool mmcfilters::AdjacencyRelation::IteratorAdjacency::operator== ( const IteratorAdjacency other) const
inline

Returns true when both iterators point to the same stencil position.

Definition at line 443 of file AdjacencyRelation.hpp.


The documentation for this class was generated from the following file: