List of my modules...

Module: Label_Connected_Components

Description:

From an input 3D grayscale image, a threshold and comparator, which defines that pixels belong to the objects, and a set of input points, each located inside a distinct connected component, this module set the intensity of the pixels inside these connected components to the index + 1 of the points inside. The +1 is because 0 is reserved for the background.

Left : input image and set of points with their indices superimposed. Right : resulting image. The nth point sets the containing connected component to an intensity of n+1.
Notes

Connections:

Image

[required]
The input image comes in through this port. For now, the only input type that has been implemented is HxUniformScalarField3.

Points

[required]
The input set of points (of type HxCluster) used to label the connected components inside the image. If two points are contained in the same connected component, then the index of the last point is used.

Ports:

Threshold


This is the threshold on the gray values that seperates the pixels of the background from the pixels of the object.

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


Specifies the connectivity, which can be either 4- or 8-connectivity, either 6- or 18- or 26-connectivity, depending whether a 2D or 3D process was chosen.

Illustration of the different connectivities in 3D. (a): 6-, (b): 18-, and (c): 26-connectivity (in case you didn't figure it out, n-connectivity means n pixels in the neighbourhood. It should be trivial in 2D).

Action button


Push the first button to label the input.

Commands:

Additional options can be accessed when typing in the console Label_Connected_Components COMMAND_NAME. Typing the command again usually reverts back to original settings.

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 [Label_Connected_Components create].