[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]
![]() |
RestrictedNeighborhoodCirculator Class Template Reference | ![]() |
---|
Circulator that walks around a given location in a given image, unsing a restricted neighborhood. More...
#include "vigra/pixelneighborhood.hxx"
Inheritance diagram for RestrictedNeighborhoodCirculator:
Public Types | |
typedef IMAGEITERATOR | base_type |
typedef NEIGHBORCODE | NeighborCode |
typedef BaseType::value_type | value_type |
typedef BaseType::Direction | Direction |
typedef BaseType::reference | reference |
typedef BaseType::index_reference | index_reference |
typedef BaseType::pointer | pointer |
typedef BaseType::difference_type | difference_type |
typedef BaseType::iterator_category | iterator_category |
Public Methods | |
RestrictedNeighborhoodCirculator (IMAGEITERATOR const ¢er=IMAGEITERATOR(), AtImageBorder atBorder=NotAtBorder) | |
RestrictedNeighborhoodCirculator & | operator++ () |
RestrictedNeighborhoodCirculator | operator++ (int) |
RestrictedNeighborhoodCirculator & | operator-- () |
RestrictedNeighborhoodCirculator | operator-- (int) |
RestrictedNeighborhoodCirculator & | operator+= (difference_type d) |
RestrictedNeighborhoodCirculator & | operator-= (difference_type d) |
RestrictedNeighborhoodCirculator | operator+ (difference_type d) const |
RestrictedNeighborhoodCirculator | operator- (difference_type d) const |
bool | operator== (RestrictedNeighborhoodCirculator const &rhs) const |
bool | operator!= (RestrictedNeighborhoodCirculator const &rhs) const |
difference_type | operator- (RestrictedNeighborhoodCirculator const &rhs) const |
reference | operator * () const |
pointer | operator-> () const |
base_type const & | base () const |
base_type | center () const |
Direction | direction () const |
unsigned int | directionBit () const |
Diff2D const & | diff () const |
bool | isDiagonal () const |
Detailed Description |
This circulator behaves essentially like vigra::NeighborhoodCirculator, but can also be used near the image border, where some of the neighbor points would be outside the image und must not be accessed. The template parameters define the kind of neighborhood used (four or eight) and the underlying image, whereas the required neighbirhood restriction is given by the last constructur argument. This below for typical usage.
The access functions return the value of the current neighbor pixel. Use center()
to access the center pixel of the neighborhood.
Usage:
#include "vigra/pixelneighborhood.hxx"
Namespace: vigra
BImage::traverser upperleft(...), lowerright(...); int width = lowerright.x - upperleft.x; int height = lowerright.y - upperleft.y; for(int y=0; y<height; ++y, ++upperleft.y) { BImage::traverser ix = upperleft; for(int x=0; x<width; ++x, ++ix.x) { // use FourNeighborCode instead of EightNeighborCode for 4-neighborhood RestrictedNeighborhoodCirculator<BImage::traverser, EightNeighborCode> circulator(ix, isAtImageBorder(x, y, width, height)), end(circulator); do { ... // do something with the circulator } while(++circulator != end); // out-of-range pixels will be automatically skipped } }
|
type of the underlying image iterator Reimplemented from NeighborhoodCirculator. |
|
the circulator's difference type (argument type of Reimplemented from NeighborhoodCirculator. |
|
type of the direction code Reimplemented from NeighborhoodCirculator. |
|
the circulator's index reference type (return type of Reimplemented from NeighborhoodCirculator. |
|
the circulator tag (random_access_circulator_tag) Reimplemented from NeighborhoodCirculator. |
|
type of the used neighbor code Reimplemented from NeighborhoodCirculator. |
|
the circulator's pointer type (return type of Reimplemented from NeighborhoodCirculator. |
|
the circulator's reference type (return type of Reimplemented from NeighborhoodCirculator. |
|
the circulator's value type Reimplemented from NeighborhoodCirculator. |
|
Construct circulator with given |
|
Get the base iterator for the current neighbor. Reimplemented from NeighborhoodCirculator. |
|
Get the base iterator for the center of the circulator. Reimplemented from NeighborhoodCirculator. |
|
Get the difference vector (Diff2D) from the center to the current neighbor. Reimplemented from NeighborhoodCirculator. |
|
Get the current direction. Reimplemented from NeighborhoodCirculator. |
|
Get the current direction bit. Reimplemented from NeighborhoodCirculator. |
|
Is the current neighbor a diagonal neighbor? Reimplemented from NeighborhoodCirculator. |
|
dereference Reimplemented from NeighborhoodCirculator. |
|
inequality |
|
addition Reimplemented from NeighborhoodCirculator. |
|
pre-decrement Reimplemented from NeighborhoodCirculator. |
|
pre-increment Reimplemented from NeighborhoodCirculator. |
|
add-assignment Reimplemented from NeighborhoodCirculator. |
|
subtraction |
|
subtraction Reimplemented from NeighborhoodCirculator. |
|
post-decrement Reimplemented from NeighborhoodCirculator. |
|
post-increment Reimplemented from NeighborhoodCirculator. |
|
subtract-assignment Reimplemented from NeighborhoodCirculator. |
|
member access Reimplemented from NeighborhoodCirculator. |
|
equality |
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|