Coloring isosurfaces and voxels in numpy array
See original GitHub issueHey
i have been using vtkplotter and its really awesome how you can do so much with so little code. I have been using it visualize volumetric data of the mouse brain and i have some doubts. My input data is a list of brain structures with associated voxels. I create a volume object and then use isosurfaces to extract the mesh. Now i want to color the different structures whose voxels i know according to different colors in the isosurfaces as well (if i can get a mesh i can smooth it and make it look prettier)
Once i have this i have a list of gene expression values for the voxels. I want to then color the voxels with the intensity of the gene expression values. We can think of this as some list of values for each voxel in a structure and then i want the color to have a gradient that follows these provided values.
I havent been able to do the visualization of the voxel values according to gene expression values. I feel that if i change the labels according to the gene expression values then i can see the colors but i dont know if perceptually it will look good. Also it would be nice to figure out how to set the colors of the different voxels in isosurface.
Thanks once again for this amazing tool
labels = list(label_dic.values())
ts = [i for i in range(0, np.amax(labels), 5)]
vol = Volume(rg, c=colors_)
isos = vol.isosurface(threshold=ts)
isos = isos.opacity(alpha = 0.3)
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (4 by maintainers)
Top GitHub Comments
sorry the doc doesnt do anything but the name works now
Hi, I think I found a better solution that will not need you to split regions. Do:
pip install -U git+https://github.com/marcomusy/vtkplotter.git
Then: