Topologically classifies the pixels of a 3D image (especially skeletons), contained in a HxUniformScalarField3. For each pixel of the object (defined by the given threshold and comparison thresholding method), three values are determined: the two topological numbers t and t', respectively the number of connected components of the object and of the background in the pixel neighbourhood, and n the number of neighbours of the pixel1. The following table summarises the classification, and gives the code used in the output image:
t
t'
n
Type
Output value
*
0
*
Interior
2
0
1
*
Isolated
3
1
1
1
Curve end
4
1
1
>1
Border point
5
2
1
2
Curve
6
>1
1
>2
Curve junction
7
*
>1
*
Surface or surface junction
8
NOTE: All other possibilities are impossible (such as t = 1 and n = 0).
Illustration of the classification using the Draw_Cubes module and a color code for the pixel types (with the colormap tensteps.col). Dark blue means isolated, orange means curve junctions, red are surfaces, etc.
Connections:
Image
[required]
The input image, defined in a class HxUniformScalarField3. The intensities of the pixels can only be stored as bytes.
Ports:
Threshold
Value that defines whether a pixel belongs to the object or not.
Comparison
Defines how the threshold is used to define the pixels of the object: should the pixel value be lower, lower or equal, greater, etc. than the threshold?
Connectivity
Choice of the neighbourhood.
Illustration of the different connectivities. (a): 6-, (b): 18-, and (c): 26-connectivity (in case you didn't figure it out, n-connectivity means n pixels in the neighbourhood).
Action button
Push this button to start the computation.
Commands:
Additional options can be accessed when typing in the console Classify_Points COMMAND_NAME.
verbose
Displays timing information after the computation. Retype to hide info.
create
Runs the computation. Returns the name of the output, so it can be used in a script, such as set RESULT [Classify_Points create].
References:
1 Malandain, G., Bertrand, G., and Ayache, N. (1992). Topological segmentation of discrete surfaces. International Journal of Computer Vision 10(2): 183-197.