List of my modules...
Module: Draw_Element
Description:
Draws the pixels of an element of the object (a pore, a grain, a particle, whatever, anything identifiable by a set of pixels having the same non-zero value) as a set of cubes. This module actually only draws the visibles faces of those cubes, i.e. the faces on the interface of the element.
An image of a set of elements is an HxUniformScalareField3 with a char, short, int (signed or not) data type, with value 0 for the background and one positive value per element. Faces of the cubes are coloured according to what they are in contact with (image border, background, other elements).
The left image shows an isosurface of a pack of 23 spheres (numbered 1 to 23, and the isosurface is at value 1), and the right image shows the central element drawn with this module, with different colours for each adjacent element (the colormap used has a different color for each integer, c.f. Create_Colormap).
Connections:
Image
[required]
The input image, a HxUniformScalarField3 with integral data type, is connected here. The value 0 is considered the background.
Ports:
Element

Element to draw.
Draw_style

Wire frames, surfaces or both for the cubes ?
Line_width

For wire frames or outlined, the size of the lines.
Color

Color of the faces of the cubes. If a colormap is given, cubes are colored according to their intensities.
Border_color

Color of the faces of the cubes touching the border.
Contact_color

Color of the faces of the cubes touching other elements. The selected color in the colormap (if a colormap is connected) is chosen according to the adjacent element's value.
Line_Color

Color of the edges of the cubes.
Options

The adjacent elements can be drawn. Ticking the legend displays the value of the adjacent elements.
Do

Push the first button to draw the cubes. Push the second button to create an object of the cubes in the object pool (as an Open Inventor object, HxIvData). Push the third button to erase the cubes in the viewer.
Commands:
Additional options can be accessed when typing in the console Draw_Element COMMAND_NAME.
verbose
Displays timing information after the computation. Retype to hide info.