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

details NeighborCode3D Class Reference VIGRA

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

#include <vigra/voxelneighborhood.hxx>

Public Types

enum  Direction
 

Static Public Member Functions

static const Diff3Dbehind ()
 
static const Diff3Dbottom ()
 
static Direction code (Diff3D const &diff)
 
static const Diff3Ddiff (Direction code)
 
static int diff (Direction code, int dim)
 
static const Diff3Ddiff (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 Diff3Deast ()
 
static const Diff3Dfront ()
 
static const Diff3Dinfront ()
 
static bool isDiagonal (Direction)
 
static const Diff3Dleft ()
 
static unsigned int nearBorderDirectionCount (AtVolumeBorder b)
 
static Direction nearBorderDirections (AtVolumeBorder b, int index)
 
static Direction nearBorderDirectionsCausal (AtVolumeBorder b, int index)
 
static const Diff3Dnorth ()
 
static const Diff3Drear ()
 
static const Diff3DrelativeDiff (Direction fromCode, Direction toCode)
 
static const Diff3DrelativeDiff (int fromCode, int toCode)
 
static const Diff3Dright ()
 
static const Diff3Dsouth ()
 
static const Diff3Dtop ()
 
static const Diff3Dwest ()
 

Detailed Description

Encapsulation of direction management of neighbors for a 3D 6-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()

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.

◆ isDiagonal()

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.

◆ right()

static const Diff3D& right ( )
static

Offset to the right neighbor

◆ top()

static const Diff3D& top ( )
static

Offset to the top neighbor

◆ left()

static const Diff3D& left ( )
static

Offset to the left neighbor

◆ bottom()

static const Diff3D& bottom ( )
static

Offset to the bottom neighbor

◆ rear()

static const Diff3D& rear ( )
static

Offset to the rear neighbor

◆ front()

static const Diff3D& front ( )
static

Offset to the neighbor in front

◆ east()

static const Diff3D& east ( )
static

Offset to the east neighbor

◆ north()

static const Diff3D& north ( )
static

Offset to the north neighbor

◆ west()

static const Diff3D& west ( )
static

Offset to the west neighbor

◆ south()

static const Diff3D& south ( )
static

Offset to the south neighbor

◆ behind()

static const Diff3D& behind ( )
static

Offset to the rear neighbor

◆ infront()

static const Diff3D& infront ( )
static

Offset to the neighbor in front


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

© 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