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

| NeighborCode3D Class Reference |

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

`#include <vigra/voxelneighborhood.hxx>`

## Public Types

enum | Direction

## Static Public Member Functions

static const Diff3D & | behind ()
static const Diff3D & | behindEast ()
static const Diff3D & | behindNorth ()
static const Diff3D & | behindNorthEast ()
static const Diff3D & | behindNorthWest ()
static const Diff3D & | behindSouth ()
static const Diff3D & | behindSouthEast ()
static const Diff3D & | behindSouthWest ()
static const Diff3D & | behindWest ()
static const Diff3D & | bottom ()
static const Diff3D & | bottomLeft ()
static const Diff3D & | bottomRight ()
static Direction | code (Diff3D const &diff)
static Direction | code (Neighborhood3DSix::Direction d)
static const Diff3D & | diff (Direction code)
static int | diff (Direction code, int dim)
static const Diff3D & | diff (int code)
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 const Diff3D & | east ()
static const Diff3D & | front ()
static const Diff3D & | frontBottom ()
static const Diff3D & | frontBottomLeft ()
static const Diff3D & | frontBottomRight ()
static const Diff3D & | frontLeft ()
static const Diff3D & | frontRight ()
static const Diff3D & | frontTop ()
static const Diff3D & | frontTopLeft ()
static const Diff3D & | frontTopRight ()
static const Diff3D & | infront ()
static const Diff3D & | infrontEast ()
static const Diff3D & | infrontNorth ()
static const Diff3D & | infrontNorthEast ()
static const Diff3D & | infrontNorthWest ()
static const Diff3D & | infrontSouth ()
static const Diff3D & | infrontSouthEast ()
static const Diff3D & | infrontSouthWest ()
static const Diff3D & | infrontWest ()
static bool | isDiagonal (Direction dir)
static const Diff3D & | left ()
static unsigned int | nearBorderDirectionCount (AtVolumeBorder b)
static Direction | nearBorderDirections (AtVolumeBorder b, int index)
static Direction | nearBorderDirectionsCausal (AtVolumeBorder b, int index)
static const Diff3D & | north ()
static const Diff3D & | northEast ()
static const Diff3D & | northWest ()
static const Diff3D & | rear ()
static const Diff3D & | rearBottom ()
static const Diff3D & | rearBottomLeft ()
static const Diff3D & | rearBottomRight ()
static const Diff3D & | rearLeft ()
static const Diff3D & | rearRight ()
static const Diff3D & | rearTop ()
static const Diff3D & | rearTopLeft ()
static const Diff3D & | rearTopRight ()
static const Diff3D | relativeDiff (Direction fromCode, Direction toCode)
static const Diff3D | relativeDiff (int fromCode, int toCode)
static const Diff3D & | right ()
static const Diff3D & | south ()
static const Diff3D & | southEast ()
static const Diff3D & | southWest ()
static const Diff3D & | top ()
static const Diff3D & | topLeft ()
static const Diff3D & | topRight ()
static const Diff3D & | west ()

## Detailed Description

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

## Member Enumeration Documentation

## ◆ Direction

enum Direction

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

## Member Function Documentation

## ◆ nearBorderDirectionCount()

static unsigned int nearBorderDirectionCount | ( | AtVolumeBorder | b | ) |

static

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

## ◆ nearBorderDirections()

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`.

## ◆ nearBorderDirectionsCausal()

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`.

## ◆ diff() [1/3]

static const Diff3D& diff | ( | Direction | code | ) |

static

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

## ◆ diff() [2/3]

static const Diff3D& diff | ( | int | code | ) |

static

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

## ◆ diff() [3/3]

static int diff | ( | Direction | code,
|  | int | dim
| ) |  |

static

Equivalent to `diff(code)[dim]`

## ◆ relativeDiff() [1/2]

static const Diff3D 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.)

## ◆ relativeDiff() [2/2]

static const Diff3D 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.)

## ◆ dX() [1/2]

static int dX | ( | Direction | code | ) |

static

X-component of diff()

## ◆ dY() [1/2]

static int dY | ( | Direction | code | ) |

static

Y-component of diff()

## ◆ dZ() [1/2]

static int dZ | ( | Direction | code | ) |

static

Z-component of diff()

## ◆ dX() [2/2]

static int dX | ( | int | code | ) |

static

X-component of diff()

## ◆ dY() [2/2]

static int dY | ( | int | code | ) |

static

Y-component of diff()

## ◆ dZ() [2/2]

static int dZ | ( | int | code | ) |

static

Z-component of diff()

## ◆ code() [1/2]

static Direction code | ( | Neighborhood3DSix::Direction | d | ) |

static

transform 6-neighborhood code into 26-neighborhood code.

## ◆ code() [2/2]

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 3DTwentySix-Neighborhood.

## ◆ isDiagonal()

static bool isDiagonal | ( | Direction | dir | ) |

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.

## ◆ frontTopLeft()

static const Diff3D& frontTopLeft | ( |  | ) |

static

Offset to the front-top-left neighbor

## ◆ frontTop()

static const Diff3D& frontTop | ( |  | ) |

static

Offset to the front-top neighbor

## ◆ frontTopRight()

static const Diff3D& frontTopRight | ( |  | ) |

static

Offset to the front-top-right neighbor

## ◆ frontLeft()

static const Diff3D& frontLeft | ( |  | ) |

static

Offset to the front-left neighbor

## ◆ front()

static const Diff3D& front | ( |  | ) |

static

Offset to the front neighbor

## ◆ frontRight()

static const Diff3D& frontRight | ( |  | ) |

static

Offset to the front-right neighbor

## ◆ frontBottomLeft()

static const Diff3D& frontBottomLeft | ( |  | ) |

static

Offset to the front-bottom-left neighbor

## ◆ frontBottom()

static const Diff3D& frontBottom | ( |  | ) |

static

Offset to the front-bottom neighbor

## ◆ frontBottomRight()

static const Diff3D& frontBottomRight | ( |  | ) |

static

Offset to the front-bottom-right neighbor

## ◆ topLeft()

static const Diff3D& topLeft | ( |  | ) |

static

Offset to the top-left neighbor

## ◆ top()

static const Diff3D& top | ( |  | ) |

static

Offset to the top neighbor

## ◆ topRight()

static const Diff3D& topRight | ( |  | ) |

static

Offset to the top-right neighbor

## ◆ left()

static const Diff3D& left | ( |  | ) |

static

Offset to the left neighbor

## ◆ right()

static const Diff3D& right | ( |  | ) |

static

Offset to the right neighbor

## ◆ bottomLeft()

static const Diff3D& bottomLeft | ( |  | ) |

static

Offset to the bottom-left neighbor

## ◆ bottom()

static const Diff3D& bottom | ( |  | ) |

static

Offset to the bottom neighbor

## ◆ bottomRight()

static const Diff3D& bottomRight | ( |  | ) |

static

Offset to the bottom-right neighbor

## ◆ rearTopLeft()

static const Diff3D& rearTopLeft | ( |  | ) |

static

Offset to the rear-top-left neighbor

## ◆ rearTop()

static const Diff3D& rearTop | ( |  | ) |

static

Offset to the rear-top neighbor

## ◆ rearTopRight()

static const Diff3D& rearTopRight | ( |  | ) |

static

Offset to the rear-top-right neighbor

## ◆ rearLeft()

static const Diff3D& rearLeft | ( |  | ) |

static

Offset to the rear-left neighbor

## ◆ rear()

static const Diff3D& rear | ( |  | ) |

static

Offset to the rear neighbor

## ◆ rearRight()

static const Diff3D& rearRight | ( |  | ) |

static

Offset to the rear-right neighbor

## ◆ rearBottomLeft()

static const Diff3D& rearBottomLeft | ( |  | ) |

static

Offset to the rear-bottom-left neighbor

## ◆ rearBottom()

static const Diff3D& rearBottom | ( |  | ) |

static

Offset to the rear-bottom neighbor

## ◆ rearBottomRight()

static const Diff3D& rearBottomRight | ( |  | ) |

static

Offset to the rear-bottom-right neighbor

## ◆ infrontNorthWest()

static const Diff3D& infrontNorthWest | ( |  | ) |

static

Offset to the infront-north-west neighbor

## ◆ infrontNorth()

static const Diff3D& infrontNorth | ( |  | ) |

static

Offset to the infront-north neighbor

## ◆ infrontNorthEast()

static const Diff3D& infrontNorthEast | ( |  | ) |

static

Offset to the infront-north-east neighbor

## ◆ infrontWest()

static const Diff3D& infrontWest | ( |  | ) |

static

Offset to the infront-west neighbor

## ◆ infront()

static const Diff3D& infront | ( |  | ) |

static

Offset to the infront neighbor

## ◆ infrontEast()

static const Diff3D& infrontEast | ( |  | ) |

static

Offset to the infront-east neighbor

## ◆ infrontSouthWest()

static const Diff3D& infrontSouthWest | ( |  | ) |

static

Offset to the infront-south-west neighbor

## ◆ infrontSouth()

static const Diff3D& infrontSouth | ( |  | ) |

static

Offset to the infront-south neighbor

## ◆ infrontSouthEast()

static const Diff3D& infrontSouthEast | ( |  | ) |

static

Offset to the infront-south-east neighbor

## ◆ northWest()

static const Diff3D& northWest | ( |  | ) |

static

Offset to the north-west neighbor

## ◆ north()

static const Diff3D& north | ( |  | ) |

static

Offset to the north neighbor

## ◆ northEast()

static const Diff3D& northEast | ( |  | ) |

static

Offset to the north-east neighbor

## ◆ west()

static const Diff3D& west | ( |  | ) |

static

Offset to the west neighbor

## ◆ east()

static const Diff3D& east | ( |  | ) |

static

Offset to the right neighbor

## ◆ southWest()

static const Diff3D& southWest | ( |  | ) |

static

Offset to the south-west neighbor

## ◆ south()

static const Diff3D& south | ( |  | ) |

static

Offset to the south neighbor

## ◆ southEast()

static const Diff3D& southEast | ( |  | ) |

static

Offset to the south-east neighbor

## ◆ behindNorthWest()

static const Diff3D& behindNorthWest | ( |  | ) |

static

Offset to the behind-north-west neighbor

## ◆ behindNorth()

static const Diff3D& behindNorth | ( |  | ) |

static

Offset to the behind-north neighbor

## ◆ behindNorthEast()

static const Diff3D& behindNorthEast | ( |  | ) |

static

Offset to the behind-north-east neighbor

## ◆ behindEast()

static const Diff3D& behindEast | ( |  | ) |

static

Offset to the behind-west neighbor

## ◆ behind()

static const Diff3D& behind | ( |  | ) |

static

Offset to the behind neighbor

## ◆ behindWest()

static const Diff3D& behindWest | ( |  | ) |

static

Offset to the behind-right neighbor

## ◆ behindSouthWest()

static const Diff3D& behindSouthWest | ( |  | ) |

static

Offset to the behind-south-west neighbor

## ◆ behindSouth()

static const Diff3D& behindSouth | ( |  | ) |

static

Offset to the behind-south neighbor

## ◆ behindSouthEast()

static const Diff3D& behindSouthEast | ( |  | ) |

static

Offset to the behind-south-east neighbor

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.11.1