[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
NeighborhoodCirculator< IMAGEITERATOR, NEIGHBORCODE > Class Template Reference |
Circulator that walks around a given location in a given image. More...
#include <vigra/pixelneighborhood.hxx>
Public Types | |
typedef IMAGEITERATOR | base_type |
typedef NEIGHBOROFFSETCIRCULATOR::difference_type | difference_type |
typedef NEIGHBORCODE::Direction | Direction |
typedef reference | index_reference |
typedef NEIGHBOROFFSETCIRCULATOR::iterator_category | iterator_category |
typedef NEIGHBORCODE | NeighborCode |
typedef IMAGEITERATOR::pointer | pointer |
typedef IMAGEITERATOR::reference | reference |
typedef IMAGEITERATOR::value_type | value_type |
Circulator that walks around a given location in a given image.
The template parameters define the kind of neighborhood used and the underlying image. The access functions return the value of the current neighbor pixel. Use center()
to access the center pixel of the neighborhood. The center can be changed by calling moveCenterToNeighbor()
or swapCenterNeighbor()
. Note that this circulator cannot be used when the center is at the image border. You must then use vigra::RestrictedNeighborhoodCirculator
Usage:
#include <vigra/pixelneighborhood.hxx>
Namespace: vigra
typedef IMAGEITERATOR base_type |
type of the underlying image iterator
typedef NEIGHBORCODE NeighborCode |
type of the used neighbor code
typedef IMAGEITERATOR::value_type value_type |
the circulator's value type
typedef NEIGHBORCODE::Direction Direction |
type of the direction code
typedef IMAGEITERATOR::reference reference |
the circulator's reference type (return type of *circ
)
typedef reference index_reference |
the circulator's index reference type (return type of circ[n]
)
typedef IMAGEITERATOR::pointer pointer |
the circulator's pointer type (return type of operator->
)
the circulator's difference type (argument type of circ[diff]
)
the circulator tag (random_access_circulator_tag)
NeighborhoodCirculator | ( | IMAGEITERATOR const & | aCenter = IMAGEITERATOR() , |
Direction | d = NEIGHBOROFFSETCIRCULATOR::InitialDirection |
||
) |
Construct circulator with given center
pixel, pointing to the neighbor at the given direction d
.
NeighborhoodCirculator& operator++ | ( | ) |
pre-increment
NeighborhoodCirculator operator++ | ( | int | ) |
post-increment
NeighborhoodCirculator& operator-- | ( | ) |
pre-decrement
NeighborhoodCirculator operator-- | ( | int | ) |
post-decrement
NeighborhoodCirculator& operator+= | ( | difference_type | d | ) |
add-assignment
NeighborhoodCirculator& operator-= | ( | difference_type | d | ) |
subtract-assignment
NeighborhoodCirculator operator+ | ( | difference_type | d | ) | const |
addition
NeighborhoodCirculator operator- | ( | difference_type | d | ) | const |
subtraction
NeighborhoodCirculator& turnRight | ( | ) |
Move to the direction that is 'right' relative to the current direction. This is equivalent to four_circulator–
and eight_circulator -= 2
respectively.
NeighborhoodCirculator& turnLeft | ( | ) |
Move to the direction that is 'left' relative to the current direction. This is equivalent to four_circulator++
and eight_circulator += 2
respectively.
NeighborhoodCirculator& turnRound | ( | ) |
Move to the opposite direction of the current direction. This is equivalent to four_circulator += 2
and eight_circulator += 4
respectively.
NeighborhoodCirculator& turnTo | ( | Direction | d | ) |
Move to the given direction.
NeighborhoodCirculator& moveCenterToNeighbor | ( | ) |
Move the center in the current direction. The current neighbor becomes the new center, the direction does not change.
NeighborhoodCirculator& swapCenterNeighbor | ( | ) |
Exchange the center with the current neighbor. Equivalent to circ.moveCenterToNeighbor().turnRound()
(but shorter and more efficient).
bool operator== | ( | NeighborhoodCirculator< IMAGEITERATOR, NEIGHBORCODE > const & | rhs | ) | const |
equality
bool operator!= | ( | NeighborhoodCirculator< IMAGEITERATOR, NEIGHBORCODE > const & | rhs | ) | const |
inequality
difference_type operator- | ( | NeighborhoodCirculator< IMAGEITERATOR, NEIGHBORCODE > const & | rhs | ) | const |
subtraction
reference operator* | ( | ) | const |
dereference
index_reference operator[] | ( | difference_type | d | ) | const |
index
pointer operator-> | ( | ) | const |
member access
base_type const& base | ( | ) | const |
Get the base iterator for the current neighbor.
base_type center | ( | ) | const |
Get the base iterator for the center of the circulator.
Direction direction | ( | ) | const |
Get the current direction.
unsigned int directionBit | ( | ) | const |
Get the current direction bit.
NEIGHBOROFFSETCIRCULATOR::value_type const& diff | ( | ) | const |
Get the difference vector (Diff2D) from the center to the current neighbor.
bool isDiagonal | ( | ) | const |
Is the current neighbor a diagonal neighbor?
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|