What is the alternative for imshow(im,[]); for 3D surface
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Ivan Shorokhov
il 4 Nov 2015
Modificato: Ivan Shorokhov
il 4 Nov 2015
Hello everybody,
[Given] I have 7 slices of 256x208 uint16 images. In order to see the image in 1D I'm using imshow(im,[]); It displays the grayscale image scaling the display based on the range of pixel values in image, the standard imshow(im) doesn't work in this case.
[Problem] Then I have tried to visualize all those image in 3D space by using 'surface', here is what I saw:
The code I used is show bellow:
surfh = surface('XData',x,'YData',y,'ZData',z,...
'CData', I,...
'FaceColor','texturemap',...
'EdgeColor','none',...
'LineStyle','none',...
'Marker','none',...
'MarkerFaceColor','none',...
'MarkerEdgeColor','none',...
'CDataMapping','direct');
%set transparency level
set( surfh, 'FaceAlpha', transparency );
% label axes and optimize figure
xlabel('RL');
ylabel('AP');
zlabel('FH');
axis tight
[Needed] I'm wondering, if there are any options to use 'surface' as imshow(im,[]);
Thanks in advance and I greatly appreciate any help,
Ivan
Thank you: @Walter Roberson
0 Commenti
Risposta accettata
Walter Roberson
il 4 Nov 2015
cdatamapping should be scaled not direct. See http://www.mathworks.com/help/matlab/ref/primitivesurface-properties.html#property_cdatamapping
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!