List of my modules...
Module: Median
Description:
Median-filters the image. For each pixel, this filter orders all the intensities of the pixels in its neighbourhood and itself. Out of these values, the pixel will take the central one (if there are an even number of values to sort, it will choose the lower of the two median ones).
Illustration of the effect of the median filter. (a) is the original image, (b) is after application of the filter.
Boundary condition
The chosen method is to copy the border values outside the image, so as to always have the same size neighbourhood to work with.
Left: coloring of the pixel greylevels in a 3x3x3 image. Right: view of a virtual 5x5x5 image in which the processing is performed, showing how the greylevel copies are made for the border pixels.
Notes
- The lace method for 6-connectivity is greyed out because 1) the complexity is not worth the small increase in speed, and 2) it's bugged and I'm not going to fix it. :)
Connections:
Image
[required]
The input image, of type HxUniformScalarField3, comes in through this port.
Ports:
Neighbourhood

Choice of the neighbourhood. Basic are the three usual 3x3x3 neighbourhoods, and sphere is the set of pixels in a sphere of a given radius.
Connectivity

If Basic Choice of the neighbourhood. Finds the median value in sets of values of different size (eg. in 6-connectivity, finds the median of 7 values (6 plus the center one), in 26-connectivity there are 27 values).
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).
Algorithm

If Basic is selected, this is the scanning method uses internally. For 18- or 26- connectivity, Lace seems to be the faster option.
Radius

If Sphere is selected, then this is the radius. of the sphere. Beware, computation time increases near exponentially with the radius.
Filter

Push this button to apply the filter.
Commands:
Additional options can be accessed when typing in the console XXXX 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 [Mean create].