List of my modules...

Module: Dilate_Erode

Description:

Dilates or erodes the image a specified number of times, using the specified connectivity. Dilation and erosion are the two basic morphological operations. In a grayscale image, this means each pixel respectively takes the maximum or minimum value of its neighbourhood. The choice of the connectivity determines this neighbourhood.

Illustration of the effect of the connectivity on the dilation. (a) is the original image, (b) is a dilation with 6-connectivity, and (c) is a dilation with either 18- or 26-connectivity (the difference is not visible in 2D).

NOTES :

Connections:

Image

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

Ports:

Which


Chooses whether a dilation or erosion is asked.

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

Passes


The number input here specifies the number of times the dilation is to be repeated.

Multi-threaded


This was an attempt at multi-threading the computation, but it's actually slower. For now... So I hid it.

Compute button


Push to dilate or erode.

Commands:

Additional options can be accessed when typing in the console Dilate 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 [Dilate_Erode create].