DGtalTools  0.9.4
3dVolMarchingCubes

Outputs the isosurface of the input volume as an OFF file

Usage: 3dVolMarchingCubes [-i <fileName.vol>] [-t <threshold>] [-a <adjacency>] [-o <output.off>]

Outputs the isosurface of value <threshold> of the volume <fileName.vol> as an OFF file <output.off>. The <adjacency> (0/1) allows to choose between interior (6,18) and exterior (18,6) adjacency.

Allowed options are :

-h [ --help ] display this message
-i [ --input ] arg the volume file (.vol)
-t [ --threshold ] arg (=1) the value that defines the isosurface
in the image (an integer between 0 and
255).
-a [ --adjacency ] arg (=0) 0: interior adjacency, 1: exterior
adjacency
-o [ --output ] arg (=marching-cubes.off)
the output OFF file that represents the
geometry of the isosurface
-n [ --noise ] arg Kanungo noise level in ]0,1[. Note that
only the largest connected component is
considered and that no specific
embedder is used.

Example:

$ 3dVolMarchingCubes -i $DGtal/examples/samples/lobster.vol -t 30
# we invert the default normol orientation to improve display (-n option):
$ meshViewer -i marching-cubes.off -n

You should obtain such a result:

res3dVolMarchingCubes.png
Resulting visualization.

You can test on other samples like http://www.tc18.org/code_data_set/3D_greyscale/bonsai.vol.bz2

$ 3dVolMarchingCubes -i bonsai.vol -t 80

You should obtain such a result:

res3dVolMarchingCubes2.png
Resulting visualization.
See also
3dVolMarchingCubes.cpp