List of my modules...

Module: Snakes

Description:

This module finds a triangulated approximation of the closed boundary of an object in a image. Using an active surfaces approach, and given one or more starting locations in the image, it generates a polygonised sphere which dilates until reaching a boundary, represented by a higher intensity in the image. The algorithm is applied on a simple mesh (which is not a triangulated surface), while the result is the dual of this mesh, i.e. a simplicial mesh which, in this case, is a set of triangles. The new position of each point of the mesh is calculated in the following way: where the different forces involved are : Inward and outward are in the direction of the normal of the plane defined by the three neighbours, while sideways means in a direction to the former.
Illustration of the active surface approach : the top left image represents the object, with a displayed isosurface showing the boundaries at a high intensity. The sphere in the centre is the starting position of the active surface. The top right image shows the initial position of the simple mesh. The bottom left image shows one iteration during the computation, where the initial sphere is deformed due to the variation of intensities in the image, but is still dilating. Finally the bottom right image shows the final resulting simplicial mesh which, after 2000 iterations, is stabilised around the boundaries of the object.

Warning :

If the parameters are not set just right, there is a strong probability of the mesh diverging (which is quite conspicuous during the computation).

Connections:

Image

[required]
Input image, which can only be of type HxUniformScalarField3.

Points

[required]
Starting position(s) for the active surfaces.

Ports:

Initialisation


Initial setup of the meshes : starting radius (should be smaller than the object to find), and mesh refinement. The finer the mesh, the more faces it will have (Warning : refinement is exponential, so keep this value low). For a 0 refinement, the simplicial mesh is an octahedron (whose dual is a cube). Each level of refinement subdivides each triangle in four.

Cells


Choice of cells. The first value is the cell to start from, the second is the number of cells to compute. They are processed in order.

Nb Iterations


Number of iterations for the computation of each surface, or cell.

Dt


Time step in between each iteration. Too high a value and the surface goes haywire.

Forces_1


Forces that are not dependent on the image. The first one slows down the elastic rebound, the second one dilates the surface (contracts it if negative), and the third one smooths the curvature.

Forces_2


Forces that depend on the image. The first one contracts the surface on high greylevels (dilates if negative), the second one contracts along the gradient direction, the third one displaces the vertex perpendicular to the gradient.

Dilate


Pressing the first button starts the computation. Pressing the second button erases what the module has drawn in the viewer.

Image sequence file prefix


If the option is selected, saves what is displayed during the computation into PNG images having the given prefix. For instance, if "abc" is given, then images will be saved from abc0000.png to abc2000.png (if 2000 frames were displayed). WARNING : do not cover the viewer while Amira is saving the images.

Options


Save and display options : the first shows different display options for the module, the second is toggled if the final surface should be saved to a file, and the third is for creating a video of the process.

Frames


Displaying the advancement of the mesh at every iteration can be time-consuming. If a value of n is entered here, the mesh will be displayed every n iterations. This can considerably speed up the computation.

Draw style


Defines how the mesh is displayed: as a set of faces, lines or points.

Surface Properties


If the chosen draw style is filled, the surface can be smooth or transparent.

Transparency


If the chosen draw style is filled, and the transparent option is toggled in surface properties, then this value indicates the level of transparency.

Commands:

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