[ 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 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 bool | isDiagonal (Direction dir) |
static unsigned int | nearBorderDirectionCount (AtVolumeBorder b) |
static Direction | nearBorderDirections (AtVolumeBorder b, int index) |
static Direction | nearBorderDirectionsCausal (AtVolumeBorder b, int index) |
static const Diff3D | relativeDiff (Direction fromCode, Direction toCode) |
static const Diff3D | relativeDiff (int fromCode, int toCode) |
Encapsulation of direction management of neighbors for a 3D 26-neighborhood.
enum Direction |
provides enumeration of all directions. DirectionCount may be used for portable loop termination conditions.
|
static |
The number of valid neighbors if the current center is at the volume border.
|
static |
The valid direction codes when the center is at the volume border. index must be in the range 0...nearBorderDirectionCount(b)-1
.
|
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
.
transform direction code into corresponding Diff3D offset. (note: there is no bounds checking on the code you pass.)
|
static |
Equivalent to diff(static_cast<Direction>(code))
. (note: there is no bounds checking on the code you pass.)
|
static |
Equivalent to diff(code)[dim]
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 |
Equivalent to relativeDiff(static_cast<Direction>(fromCode), static_cast<Direction>(toCode)). (note: there is no bounds checking on the code you pass.)
|
static |
X-component of diff()
|
static |
Y-component of diff()
|
static |
Z-component of diff()
|
static |
transform 6-neighborhood code into 26-neighborhood code.
transform Diff3D offset into corresponding direction code. The code Direction::Error
will be returned if diff
is not in the 3DTwentySix-Neighborhood.
|
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.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |