List of my modules...

Module: Plug_Holes

Description:

Plugs holes that go through an object (i.e. tunnels). For cavities, or holes inside the object, that're not connected to the outside, see the module Fill_Holes.

Basically, the module performs a distance map on the background of the image, then skeletonises the entire volume, anchoring the points of the object and using the distance map as priority.


Illustration of hole plugging. The left image is the object to plug, a rotated digitised donut. The right image is the result, displayed with the module Draw_Cubes with the modified pixels in red.
Notes

Connections:

Data

[required]
The input image, of type HxUniformScalarField3.

Ports:

Threshold


Threshold defining the pixels of the object.

Comparison


The way the threshold value is used.

Connectivity


Adjacency relation of the object. I didn't add 18-connectivity, because during tests plenty of Bing houses tended to appear. Anyway nobody uses 18-connectivity. :)

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

Plug_value


Value to assign to the pixels of the hole that have been "plugged".

Compute


Starts the computation.

Commands:

Additional options can be accessed when typing in the console Plug_Holes COMMAND_NAME.

create

Runs the computation. Returns the name of the output, so it can be used in a script, such as set RESULT [Plug_Holes create].

verbose

Displays additional information.