plot dots on a 3D images
1 次查看(过去 30 天)
显示 更早的评论
I need to visualize many dots on a 3D image 355*355*55 (uint16).
There are a RCS file with 9000 coordinates (X,Y,Z) and another TT logical file 0/1. When TT = 1, I need to put a red spot in the corresponding coordinates of RCS.
The following code, works only on a zeros image of the same size of img, where I can see white pixels on a black background
zeros_img = zeros(size(img));
for j = 1 : length(RCS(:,3))
zeros_img(RCS(j, 1), RCS(j, 2), RCS(j, 3)) = TT(j);
end
However, I need to plot red spots on my original image.
The code:
imshow(img);
hold on;
plot(x, y, 'r.', 'MarkerSize', 2);
hold off;
It works but I cannot call imshow 9000 times. Moreover, RCS is 9000 in size and not in order of slice.
Thanks for your help
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!