List of my modules...

Module: Envelope

Description:

Computes a binary mask for the outer enveloppe of the object (defined by a threshold value). The process is equivalent to finding the enveloppe by making a ball of a given radius roll on the object surface. If the ball can plunge in a huge crevasse in the object, than that crevasse is part of the outside and not the inside.
The process is a series of simple operations illustrated in the following figure.

Illustration of the process, with n the radius of the ball mentioned above. The two operations with greyed captions are applied if the Cut sample option is set, i.e. when the image does not contain the entire object. The enveloppe is shown in red over the original image in the bottom right.

This process produces some parasitic stuff at the interface, when there is a certain ruggedness to the object surface, it can be distinguished in the previous figure. A refinement procedure is available to avoid this, without cropping any of the real porosity near this surface. The idea is to remove small interior background regions on the outer part of the enveloppe if they are not directly connected to the rest of the interior background. The following figure presents the additional operations.

Illustration of the refinement process, with n the thickness of the outer part mentioned above. In this case, n was set to 5 (the ball radius was set to 10), and appears insufficient: if you look just below the big bubble on the top left part in the result, there's still a bit of red on the outer part. Setting the value to 6 removes it.

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.

Ball size


Radius of the rolling ball.

Options


The first option is in case the object is cut by the image boundary, i.e. when interior background pixels touch the image border (as in the figures above). The second option is the refinement process.

Refine size


Distance from the outside in which to look for potentially bad pixels.

Action button


Starts the computation.

Commands:

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

create

Returns the name of the output. If no output yet, runs the computation first. Ca use in a script, such as set RESULT [Classify_Points create].

Scripting:

Typical use in a TCL script would look like so:
	set E [create Envelope];  
	$E data connect $INPUT_IMAGE; $E fire
	$E select;
	$E Threshold setValue 0; $E Comp setValue 5;
	$E Ball_Size setValue 30;
	$E Options setValue 0 0; $E Options setValue 1 1;
	$E Refine_Size setValue 20
	set OUTPUT_IMAGE [$E create]