I found this function instead, easier to add coloring to voxels and also seems more memory efficient.
How can I use a colormap for displaying voxel intensity when plotting 3D-voxels using voxel.m?
1 view (last 30 days)
Show older comments
Hi there,
I'm plotting a bunch of voxels using this function called voxel.m, see: http://www.mathworks.com/matlabcentral/fileexchange/3280-voxel
With this function it is easy to represent the intensity of the voxel by changing the opacity of each voxel. This however does not give such an informative figure when several voxels are plotted close to each other so I would prefer to instead have a constant opacity but instead change the color of the voxels depending on their intensity.
How can I change these lines from voxel.m where c is the color variable (for example 'r' for red) so that it instead gets an intensityvalue [0,1] as indata and then plots the color using a colormap?
h=patch(x(5:8,1),x(5:8,2),x(5:8,3),c);
set(h,'FaceAlpha',alpha);
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Colormaps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!