[ VIGRA Homepage |
Class Index |
Function Index |
File Index |
Main Page ]
|
NeighborOffsetCirculator Class Template Reference
|
 |
Circulator that walks around a given location.
More...
#include "vigra/pixelneighborhood.hxx"
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;
Since this circulator doesn't now about the pixels in any particular image, you usually doesn't use it directly but rather as a base class or helper for neighborhood circulators refering to a particular image (e.g. NeighborhoodCirculator)
#include "vigra/pixelneighborhood.hxx"
Namespace: vigra
Member Typedef Documentation
typedef int difference_type
|
|
|
the circulator's difference type (argument type of circ[diff] ) |
typedef NEIGHBORCODE::Direction Direction
|
|
typedef Diff2D const& index_reference
|
|
|
the circulator's index reference type (return type of circ[n] ) |
typedef random_access_circulator_tag iterator_category
|
|
|
the circulator tag (random access iterator) |
|
the circulator's pointer type (return type of operator-> ) |
typedef Diff2D const& reference
|
|
|
the circulator's reference type (return type of *circ ) |
|
the circulator's value type |
Constructor & Destructor Documentation
NeighborOffsetCirculator |
( |
Direction |
dir = East |
) |
[inline] |
|
|
Create circulator refering to the given direction. |
Member Function Documentation
|
Get Diff2D offset to given direction. |
Diff2D const& diff |
( |
|
) |
const [inline] |
|
|
Get Diff2D offset from center to current neighbor. |
|
Get direction code at offset of current direction. |
int dX |
( |
|
) |
const [inline] |
|
int dY |
( |
|
) |
const [inline] |
|
bool isDiagonal |
( |
|
) |
const [inline] |
|
|
Check whether current direction is a diagonal one. |
bool operator!= |
( |
NeighborOffsetCirculator< NEIGHBORCODE > const & |
o |
) |
const [inline] |
|
NeighborOffsetCirculator operator++ |
( |
int |
|
) |
[inline] |
|
NeighborOffsetCirculator& operator++ |
( |
|
) |
[inline] |
|
difference_type operator- |
( |
NeighborOffsetCirculator< NEIGHBORCODE > const & |
o |
) |
const [inline] |
|
NeighborOffsetCirculator operator-- |
( |
int |
|
) |
[inline] |
|
NeighborOffsetCirculator& operator-- |
( |
|
) |
[inline] |
|
pointer operator-> |
( |
|
) |
const [inline] |
|
bool operator== |
( |
NeighborOffsetCirculator< NEIGHBORCODE > const & |
o |
) |
const [inline] |
|
|
Get relative distance (Diff2D) from current neighbor to neighbor at given offset. |
NeighborOffsetCirculator& turnLeft |
( |
|
) |
[inline] |
|
|
Move to the direction that is 'left' relative to the current direction. This is equivalent to four_circulator++ and eight_circulator += 2 respectively. |
NeighborOffsetCirculator& turnRight |
( |
|
) |
[inline] |
|
|
Move to the direction that is 'right' relative to the current direction. This is equivalent to four_circulator-- and eight_circulator -= 2 respectively. |
NeighborOffsetCirculator& turnRound |
( |
|
) |
[inline] |
|
|
Move to the opposite direction of the current direction. This is equivalent to four_circulator += 2 and eight_circulator += 4 respectively. |
NeighborOffsetCirculator& turnTo |
( |
Direction |
d |
) |
[inline] |
|
|
Move to the given direction. |
The documentation for this class was generated from the following file: