DGtalTools  1.2.0
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 :

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

Example:

$ 3dVolMarchingCubes $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:

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:

Resulting visualization.
See also
3dVolMarchingCubes.cpp