- Consider mapping the values in the matrix from “0” and “1” to a wider range of values to enhance the visibility of voxel regions corresponding to 0. For example, you can set the values corresponding to 0 to some negative values or a small positive value and see if this creates a more visible difference in the output.
- You can try using a custom “Colormap” in the “volshow” function that may help in improving the contrast of the output image.
How to show all voxels properly with 3D matrix data using volshow()??
4 次查看(过去 30 天)
显示 更早的评论
I try to show image with voxels (150x150x150 arrays) using volshow().
Arrays consits of only 0 or 1 value which means different material region for each others.
The regions corresponded to 0 aren't showed well in images created by volshow().
Please give me some advice to treat that problem!!
0 个评论
回答(1 个)
Moksh
2023-9-29
Hi SEO BOIL,
I understand that you are trying to visualize image voxels using the “volshow” function in MATLAB, but the areas marked with “0” in the matrix are not shown properly.
You can try the following steps for improving the output:
Kindly refer to the following code snippet on how to use a custom colormap with the “volshow” function in MATLAB:
% Random voxel data
voxels = randi([0, 1], [150, 150, 150]);
customColormap = [0 0 0; 0 1 1]; % Black for 0, Cyan for 1
volshow(voxels, 'Colormap', customColormap);
For more information about the “volshow” function, please refer to the following documentation:
I hope this information helps in resolving the issue you are facing.
Best Regards,
Moksh Aggarwal
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Basic Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!