-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi Anurag, I'm not sure I understand what you are trying to do... you want to visualize a custom/predefined subset of voxels as small cubes? and color it based on the voxel value? |
Beta Was this translation helpful? Give feedback.
-
Uhm, maybe you wish to use a import numpy as np
from vedo import *
X, Y, Z = np.mgrid[:30, :30, :30]
scalar_field = ((X-0)**2 + (Y-15)**2 + (Z-15)**2)/225
vol = Volume(scalar_field)
pcl = vol.topoints().ps(4)
# pcl.print()
# pcl.pointdata.select('input_scalars')
# pcl.pointdata['myscals'] = pcl.pointdata['input_scalars']+10
marker = Cube().scale(0.2)
glyphed_pcl = Glyph(pcl, marker, scaleByScalar=True).cmap('jet')
glyphed_pcl.addScalarBar()
show(pcl, glyphed_pcl, N=2, axes=1) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uhm, maybe you wish to use a
Glyph
object to represent the voxels, e.g.: