slice_mesh.py 398 B

12345678910111213141516
  1. """Probe a Volume with a Mesh"""
  2. from vedo import *
  3. # Load a Volume
  4. vol = Volume(dataurl + 'embryo.slc')
  5. vol.cmap('bone').mode(1)
  6. # Create a Mesh (can be any mesh)
  7. msh = Paraboloid(res=200).scale(200).pos([100,100,200])
  8. # Probe the Volume with the Mesh
  9. # and colorize it with the probed values
  10. msh.probe(vol)
  11. msh.cmap('Spectral').add_scalarbar().print()
  12. show(vol, msh, __doc__, axes=1).close()