sliceomatic!

http://www.mathworks.com/matlabcentral/fileexchange/764

Doug

]]>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 ]]>

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:

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/isonormals.html

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/isocaps.html

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/isocolors.html

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')]]>