Skip to content

Instantly share code, notes, and snippets.

@somada141
Last active August 29, 2015 14:03
Show Gist options
  • Save somada141/0fe52143b68187ff278d to your computer and use it in GitHub Desktop.
Save somada141/0fe52143b68187ff278d to your computer and use it in GitHub Desktop.
Visualize Mesh (MayaVi) #python #visualization #meshing #mayavi #mlab
# mesh created with
# verts, faces = skimage.measure.marching_cubes(volume, level, spacing=(1.0, 1.0, 1.0))
from mayavi import mlab
verts, faces = marching_cubes(myvolume, 0.0, (1., 1., 2.))
mlab.triangular_mesh([vert[0] for vert in verts],
[vert[1] for vert in verts],
[vert[2] for vert in verts],
faces)
mlab.show()
From:
http://scikit-image.org/docs/dev/api/skimage.measure.html?highlight=marching_cubes#skimage.measure.marching_cubes
http://scikit-image.org/docs/dev/auto_examples/plot_marching_cubes.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment