diff --git a/skimage/measure/_marching_cubes.py b/skimage/measure/_marching_cubes.py index a761ece4..09332d1c 100644 --- a/skimage/measure/_marching_cubes.py +++ b/skimage/measure/_marching_cubes.py @@ -83,17 +83,24 @@ def marching_cubes(volume, level=None, spacing=(1., 1., 1.), To quantify the area of an isosurface generated by this algorithm, pass outputs directly into `skimage.measure.mesh_surface_area`. - Regarding visualization of algorithm output, the ``mayavi`` package - is recommended. To contour a volume named `myvolume` about the level 0.0:: + Regarding visualization of algorithm output, to contour a volume + named `myvolume` about the level 0.0, using the ``mayavi`` package:: >>> from mayavi import mlab # doctest: +SKIP - >>> verts, faces = marching_cubes(myvolume, 0.0, (1., 1., 2.)) # doctest: +SKIP + >>> verts, faces = marching_cubes(myvolume, 0.0) # doctest: +SKIP >>> mlab.triangular_mesh([vert[0] for vert in verts], ... [vert[1] for vert in verts], ... [vert[2] for vert in verts], ... faces) # doctest: +SKIP >>> mlab.show() # doctest: +SKIP - + + Similarly using the ``visvis`` package:: + + >>> import visvis as vv # doctest: +SKIP + >>> verts, faces = marching_cubes(myvolume, 0.0) # doctest: +SKIP + >>> vv.mesh(np.fliplr(verts), faces) # doctest: +SKIP + >>> vv.use().Run() # doctest: +SKIP + References ---------- .. [1] Lorensen, William and Harvey E. Cline. Marching Cubes: A High