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 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Colormaps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!