Matlab 3d volume visualization and 3d overlay

不羁岁月 提交于 2019-12-04 09:33:14
Ofek Shilon

There's an excellent utility called vol3d, by mathworks employee Joe Conti. I think it addresses your visualization needs exactly - give it a try.

Update (11/2012): File that is linked to above no longer exists. There is a new version here though.

I'm not sure I understand the second part of the question, but here's how you visualize a 3D volume using isosurfaces (I'm using the fluid-flow example data)

%# get a sample data with 0 for empty, 1 for solid
[~,~,~,v] = flow;
v = double( v<-3 );

%# visualize the volume
p = patch( isosurface(v,0) );                 %# create isosurface patch
isonormals(v, p)                              %# compute and set normals
set(p, 'FaceColor','r', 'EdgeColor','none')   %# set surface props
daspect([1 1 1])                              %# axes aspect ratio
view(3), axis vis3d tight, box on, grid on    %# set axes props
camproj perspective                           %# use perspective projection
camlight, lighting phong, alpha(.5)           %# enable light, set transparency

To learn more about volume visualization in MATLAB, refer to this excellent video tutorial series posted on Doug's blog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!