Comments on: Basics: Volume visualization: 5/9 Making a 3-d plot ‘pretty’ with lighting, shading, interpolation, etc… https://blogs.mathworks.com/videos/2009/11/17/basics-volume-visualization-59-making-a-3-d-plot-pretty-with-lighting-shading-interpolation-etc/?s_tid=feedtopost Stuart uses video to share his experiences solving problems with MATLAB day-to-day, interesting new features, plus tips and tricks he has picked up along the way. Tue, 01 Jun 2010 20:20:56 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: dhull https://blogs.mathworks.com/videos/2009/11/17/basics-volume-visualization-59-making-a-3-d-plot-pretty-with-lighting-shading-interpolation-etc/#comment-2080 Tue, 01 Jun 2010 20:20:56 +0000 https://blogs.mathworks.com/videos/2009/11/17/basics-volume-visualization-59-making-a-3-d-plot-pretty-with-lighting-shading-interpolation-etc/#comment-2080 @Ahmad,

sliceomatic!
https://www.mathworks.com/matlabcentral/fileexchange/764-sliceomatic

Doug

]]>
By: Ahmad https://blogs.mathworks.com/videos/2009/11/17/basics-volume-visualization-59-making-a-3-d-plot-pretty-with-lighting-shading-interpolation-etc/#comment-2079 Tue, 01 Jun 2010 19:35:56 +0000 https://blogs.mathworks.com/videos/2009/11/17/basics-volume-visualization-59-making-a-3-d-plot-pretty-with-lighting-shading-interpolation-etc/#comment-2079 Hi
I have a question that i cant really solve it
i have a 3D matrix A(424x424x192) where A(424x424x1)is an image of the first layer of an object and then A(424x424x2)is the image of the second layer(for example the first layer is at zero cm hieght and the second layer is at 2 cm hieght and so on until we reach the last layer A(424x424x192)which is at 192 cm hieght.
i wand to plot this matrix to get a volume shape of my object.
but i dont know how to do it. so if any one can help i will be really happy
thanks
Ahmad

]]>
By: Patrick Kalita https://blogs.mathworks.com/videos/2009/11/17/basics-volume-visualization-59-making-a-3-d-plot-pretty-with-lighting-shading-interpolation-etc/#comment-1683 Wed, 18 Nov 2009 13:58:34 +0000 https://blogs.mathworks.com/videos/2009/11/17/basics-volume-visualization-59-making-a-3-d-plot-pretty-with-lighting-shading-interpolation-etc/#comment-1683 Hello! This is Patrick, that voice you hear in this video.

As Tom notes, the ISONORMALS command is great to use in conjunction with the ISOSUFACE command. ISONORMALS can make the surface look more continuous by adjusting the ‘VertexNormals’ property of the patch object based on the gradient of the underlying data. In fact, when you call ISOSURFACE without an output argument it makes use of the ISONORMALS command.

In the interest of limiting the total length of this presentation to one hour I had to forgo talking about the nice ISOSURFACE-helpers like ISONORMALS, ISOCAPS, and ISOCOLORS. But please feel free to check them out in the documentation:
https://www.mathworks.com/help/matlab/ref/isonormals.html
https://www.mathworks.com/help/matlab/ref/isocaps.html
https://www.mathworks.com/help/matlab/ref/isocolors.html

]]>
By: Tom Clark https://blogs.mathworks.com/videos/2009/11/17/basics-volume-visualization-59-making-a-3-d-plot-pretty-with-lighting-shading-interpolation-etc/#comment-1682 Wed, 18 Nov 2009 11:24:44 +0000 https://blogs.mathworks.com/videos/2009/11/17/basics-volume-visualization-59-making-a-3-d-plot-pretty-with-lighting-shading-interpolation-etc/#comment-1682 Nice, thanks to Doug and Patrick.

The alpha command is useful – I hadn’t come across that, and always struggled with setting facealpha value etc for individual patches.

Also well worth a mention is the isonormals command, which effectively removes the faceted appearance of the patch objects (although gouraud lighting helps, computing the isonormals is still a substantial improvement).

From the ML isonormals help:

data = cat(3, [0 .2 0; 0 .3 0; 0 0 0], ...
              [.1 .2 0; 0 1 0; .2 .7 0],...
              [0 .4 .2; .2 .4 0;.1 .1 0]);
data = interp3(data,3,'cubic');

subplot(1,2,1)
p1 = patch(isosurface(data,.5),...
'FaceColor','red','EdgeColor','none');
view(3); daspect([1,1,1]); axis tight
camlight; camlight(-80,-10); lighting phong; 
title('Triangle Normals')

subplot(1,2,2)
p2 = patch(isosurface(data,.5),...
    'FaceColor','red','EdgeColor','none');
isonormals(data,p2)
view(3); daspect([1 1 1]); axis tight
camlight;  camlight(-80,-10); lighting phong; 
title('Data Normals')

]]>