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

| NeighborCode3D Class Reference |

Encapsulation of direction management of neighbors for a 3D 6-neighborhood. More...

`#include <vigra/voxelneighborhood.hxx>`

List of all members.

## Public Types
enum | Direction
## Static Public Member Functions
static Diff3D const & | behind ()
static Diff3D const & | bottom ()
static Direction | code (Diff3D const &diff)
static Diff3D const & | diff (Direction code)
static Diff3D const & | diff (int code)
static int | diff (Direction code, int dim)
static int | dX (Direction code)
static int | dX (int code)
static int | dY (Direction code)
static int | dY (int code)
static int | dZ (Direction code)
static int | dZ (int code)
static Diff3D const & | east ()
static Diff3D const & | front ()
static Diff3D const & | infront ()
static bool | isDiagonal (Direction)
static Diff3D const & | left ()
static unsigned int | nearBorderDirectionCount (AtVolumeBorder b)
static Direction | nearBorderDirections (AtVolumeBorder b, int index)
static Direction | nearBorderDirectionsCausal (AtVolumeBorder b, int index)
static Diff3D const & | north ()
static Diff3D const & | rear ()
static Diff3D const & | relativeDiff (Direction fromCode, Direction toCode)
static Diff3D const & | relativeDiff (int fromCode, int toCode)
static Diff3D const & | right ()
static Diff3D const & | south ()
static Diff3D const & | top ()
static Diff3D const & | west ()

## Detailed Description

Encapsulation of direction management of neighbors for a 3D 6-neighborhood.

## Member Enumeration Documentation

enum Direction

provides enumeration of all directions. DirectionCount may be used for portable loop termination conditions.

## Member Function Documentation

static unsigned int nearBorderDirectionCount | ( | AtVolumeBorder | b | ) | `[static]`

The number of valid neighbors if the current center is at the volume border.

static Direction nearBorderDirections | ( | AtVolumeBorder | b,
|  | int | index
| ) |  | `[static]`

The valid direction codes when the center is at the volume border. index must be in the range `0...nearBorderDirectionCount(b)-1`.

static Direction nearBorderDirectionsCausal | ( | AtVolumeBorder | b,
|  | int | index
| ) |  | `[static]`

The valid direction three codes in anti causal direction (means: look back in scanline direction)when the center is at the volume border. Should be used with isAtVolumeBorderCausal to determine the Directions, as this avoids using of the nonesense border ids (e.g. 0,1,8,9...) of this table. index must be in the range `0...nearBorderDirectionCount(b)-1`.

static Diff3D const& diff | ( | Direction | code | ) | `[static]`

transform direction code into corresponding Diff3D offset. (note: there is no bounds checking on the code you pass.)

static Diff3D const& diff | ( | int | code | ) | `[static]`

Equivalent to `diff(static_cast<Direction>(code))`. (note: there is no bounds checking on the code you pass.)

static int diff | ( | Direction | code,
|  | int | dim
| ) |  | `[static]`

Equivalent to `diff(code)[dim]`

static Diff3D const& relativeDiff | ( | Direction | fromCode,
|  | Direction | toCode
| ) |  | `[static]`

Get the relative offset from one neighbor to the other. For example, `relativeDiff(East, West) == multi_differencetype(-2,0,0)`. (note: there is no bounds checking on the code you pass.)

static Diff3D const& relativeDiff | ( | int | fromCode,
|  | int | toCode
| ) |  | `[static]`

Equivalent to relativeDiff(static_cast<Direction>(fromCode), static_cast<Direction>(toCode)). (note: there is no bounds checking on the code you pass.)

static int dX | ( | Direction | code | ) | `[static]`

X-component of diff()

static int dY | ( | Direction | code | ) | `[static]`

Y-component of diff()

static int dZ | ( | Direction | code | ) | `[static]`

Z-component of diff()

static int dX | ( | int | code | ) | `[static]`

X-component of diff()

static int dY | ( | int | code | ) | `[static]`

Y-component of diff()

static int dZ | ( | int | code | ) | `[static]`

Z-component of diff()

static Direction code | ( | Diff3D const & | diff | ) | `[static]`

transform Diff3D offset into corresponding direction code. The code `Direction::Error` will be returned if `diff` is not in the 3DSix-Neighborhood.

static bool isDiagonal | ( | Direction |  | ) | `[static]`

Check whether a code refers to a diagonal direction. Useful if you want to abstract the differences between 6- and 26-neighborhood. Always `false` for 6-neighborhood.

static Diff3D const& right | ( |  | ) | `[static]`

Offset to the right neighbor

static Diff3D const& top | ( |  | ) | `[static]`

Offset to the top neighbor

static Diff3D const& left | ( |  | ) | `[static]`

Offset to the left neighbor

static Diff3D const& bottom | ( |  | ) | `[static]`

Offset to the bottom neighbor

static Diff3D const& rear | ( |  | ) | `[static]`

Offset to the rear neighbor

static Diff3D const& front | ( |  | ) | `[static]`

Offset to the neighbor in front

static Diff3D const& east | ( |  | ) | `[static]`

Offset to the east neighbor

static Diff3D const& north | ( |  | ) | `[static]`

Offset to the north neighbor

static Diff3D const& west | ( |  | ) | `[static]`

Offset to the west neighbor

static Diff3D const& south | ( |  | ) | `[static]`

Offset to the south neighbor

static Diff3D const& behind | ( |  | ) | `[static]`

Offset to the rear neighbor

static Diff3D const& infront | ( |  | ) | `[static]`

Offset to the neighbor in front

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

- vigra/voxelneighborhood.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.9.0 (Tue Nov 6 2012)