[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

Public Types | Public Member Functions | Static Public Member Functions | List of all members
NeighborOffsetCirculator< NEIGHBORCODE > Class Template Reference

Circulator that walks around a given location. More...

`#include <vigra/pixelneighborhood.hxx>`

## Public Types

typedef int | difference_type
typedef NEIGHBORCODE::Direction | Direction
typedef value_type const & | index_reference
typedef random_access_circulator_tag | iterator_category
typedef value_type const * | pointer
typedef value_type const & | reference
typedef NEIGHBORCODE::difference_type | value_type

## Public Member Functions

reference | diff () const
Direction | direction () const
Direction | direction (difference_type offset) const
unsigned int | directionBit () const
int | dX () const
int | dY () const
bool | isDiagonal () const
| NeighborOffsetCirculator (Direction dir=NEIGHBORCODE::InitialDirection)
bool | operator!= (NeighborOffsetCirculator const &o) const
reference | operator* () const
NeighborOffsetCirculator | operator+ (difference_type d) const
NeighborOffsetCirculator & | operator++ ()
NeighborOffsetCirculator | operator++ (int)
NeighborOffsetCirculator & | operator+= (difference_type d)
NeighborOffsetCirculator | operator- (difference_type d) const
difference_type | operator- (NeighborOffsetCirculator const &o) const
NeighborOffsetCirculator & | operator-- ()
NeighborOffsetCirculator | operator-- (int)
NeighborOffsetCirculator & | operator-= (difference_type d)
pointer | operator-> () const
bool | operator== (NeighborOffsetCirculator const &o) const
index_reference | operator[] (difference_type d) const
Direction | opposite () const
unsigned int | oppositeDirectionBit () const
value_type | relativeDiff (difference_type offset) const
NeighborOffsetCirculator & | turnLeft ()
NeighborOffsetCirculator & | turnRight ()
NeighborOffsetCirculator & | turnRound ()
NeighborOffsetCirculator & | turnTo (Direction d)

## Static Public Member Functions

static reference | diff (Direction dir)

## Detailed Description

template<class NEIGHBORCODE>
class vigra::NeighborOffsetCirculator< NEIGHBORCODE >

Circulator that walks around a given location.

The template parameter defines the kind of neighborhood used, e.g.

NeighborOffsetCirculator<EightNeighborCode> eight_circulator;
NeighborOffsetCirculator<FourNeighborCode> four_circulator;
vigra::NeighborOffsetCirculator::NeighborOffsetCirculator
NeighborOffsetCirculator(Direction dir=NEIGHBORCODE::InitialDirection)
Definition pixelneighborhood.hxx:752

Since this circulator doesn't know about the pixels in any particular image, you usually don't use it directly but rather as a base class or helper for neighborhood circulators referring to a particular image (e.g. NeighborhoodCirculator)

#include <vigra/pixelneighborhood.hxx>
Namespace: vigra

## Member Typedef Documentation

## ◆ Direction

template<class NEIGHBORCODE>

typedef NEIGHBORCODE::Direction Direction

return type of direction()

## ◆ value_type

template<class NEIGHBORCODE>

typedef NEIGHBORCODE::difference_type value_type

the circulator's value type

## ◆ reference

template<class NEIGHBORCODE>

typedef value_type const& reference

the circulator's reference type (return type of *circ)

## ◆ index_reference

template<class NEIGHBORCODE>

typedef value_type const& index_reference

the circulator's index reference type (return type of circ[n])

## ◆ pointer

template<class NEIGHBORCODE>

typedef value_type const* pointer

the circulator's pointer type (return type of operator->)

## ◆ difference_type

template<class NEIGHBORCODE>

typedef int difference_type

the circulator's difference type (argument type of circ[diff])

## ◆ iterator_category

template<class NEIGHBORCODE>

typedef random_access_circulator_tag iterator_category

the circulator tag (random access iterator)

## Constructor & Destructor Documentation

## ◆ NeighborOffsetCirculator()

template<class NEIGHBORCODE>

NeighborOffsetCirculator | ( | Direction | dir = NEIGHBORCODE::InitialDirection | ) |

Create circulator referring to the given direction.

## Member Function Documentation

## ◆ operator++() [1/2]

template<class NEIGHBORCODE>

NeighborOffsetCirculator & operator++ | ( |  | ) |

pre-increment

## ◆ operator--() [1/2]

template<class NEIGHBORCODE>

NeighborOffsetCirculator & operator-- | ( |  | ) |

pre-decrement

## ◆ operator++() [2/2]

template<class NEIGHBORCODE>

NeighborOffsetCirculator operator++ | ( | int |  | ) |

post-increment

## ◆ operator--() [2/2]

template<class NEIGHBORCODE>

NeighborOffsetCirculator operator-- | ( | int |  | ) |

post-decrement

## ◆ operator+=()

template<class NEIGHBORCODE>

NeighborOffsetCirculator & operator+= | ( | difference_type | d | ) |

add-assignment

## ◆ operator-=()

template<class NEIGHBORCODE>

NeighborOffsetCirculator & operator-= | ( | difference_type | d | ) |

subtract-assignment

## ◆ operator+()

template<class NEIGHBORCODE>

NeighborOffsetCirculator operator+ | ( | difference_type | d | ) | const

addition

## ◆ operator-() [1/2]

template<class NEIGHBORCODE>

NeighborOffsetCirculator operator- | ( | difference_type | d | ) | const

subtraction

## ◆ turnRight()

template<class NEIGHBORCODE>

NeighborOffsetCirculator & turnRight | ( |  | ) |

Move to the direction that is 'right' relative to the current direction. This is equivalent to four_circulator– and eight_circulator -= 2 respectively.

## ◆ turnLeft()

template<class NEIGHBORCODE>

NeighborOffsetCirculator & turnLeft | ( |  | ) |

Move to the direction that is 'left' relative to the current direction. This is equivalent to four_circulator++ and eight_circulator += 2 respectively.

## ◆ turnRound()

template<class NEIGHBORCODE>

NeighborOffsetCirculator & turnRound | ( |  | ) |

Move to the opposite direction of the current direction. This is equivalent to four_circulator += 2 and eight_circulator += 4 respectively.

## ◆ turnTo()

template<class NEIGHBORCODE>

NeighborOffsetCirculator & turnTo | ( | Direction | d | ) |

Move to the given direction.

## ◆ operator==()

template<class NEIGHBORCODE>

bool operator== | ( | NeighborOffsetCirculator< NEIGHBORCODE > const & | o | ) | const

equality

## ◆ operator!=()

template<class NEIGHBORCODE>

bool operator!= | ( | NeighborOffsetCirculator< NEIGHBORCODE > const & | o | ) | const

inequality

## ◆ operator-() [2/2]

template<class NEIGHBORCODE>

difference_type operator- | ( | NeighborOffsetCirculator< NEIGHBORCODE > const & | o | ) | const

subtraction

## ◆ operator*()

template<class NEIGHBORCODE>

reference operator* | ( |  | ) | const

dereference

## ◆ operator[]()

template<class NEIGHBORCODE>

index_reference operator[] | ( | difference_type | d | ) | const

index

## ◆ operator->()

template<class NEIGHBORCODE>

pointer operator-> | ( |  | ) | const

member access

## ◆ diff() [1/2]

template<class NEIGHBORCODE>

reference diff | ( |  | ) | const

Get offset from center to current neighbor.

## ◆ diff() [2/2]

template<class NEIGHBORCODE>

reference diff | ( | Direction | dir | ) |

static

Get offset to given direction.

## ◆ relativeDiff()

template<class NEIGHBORCODE>

value_type relativeDiff | ( | difference_type | offset | ) | const

Get relative distance from current neighbor to neighbor at given offset.

## ◆ dX()

template<class NEIGHBORCODE>

int dX | ( |  | ) | const

X-component of diff()

## ◆ dY()

template<class NEIGHBORCODE>

int dY | ( |  | ) | const

Y-component of diff()

## ◆ isDiagonal()

template<class NEIGHBORCODE>

bool isDiagonal | ( |  | ) | const

Check whether current direction is a diagonal one.

## ◆ direction() [1/2]

template<class NEIGHBORCODE>

Direction direction | ( |  | ) | const

Get current direction.

## ◆ directionBit()

template<class NEIGHBORCODE>

unsigned int directionBit | ( |  | ) | const

Get current direction bit.

## ◆ opposite()

template<class NEIGHBORCODE>

Direction opposite | ( |  | ) | const

Get opposite of current direction.

## ◆ oppositeDirectionBit()

template<class NEIGHBORCODE>

unsigned int oppositeDirectionBit | ( |  | ) | const

Get opposite bit of current direction.

## ◆ direction() [2/2]

template<class NEIGHBORCODE>

Direction direction | ( | difference_type | offset | ) | const

Get direction code at offset of current direction.

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

- vigra/pixelneighborhood.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.12.4