3D Rendering 三维渲染
Direct Volume Rendering 直接的体绘制
通过改变基于像素强度的颜色、不透明度和阴影部分,可以生动地重建解剖结构。如图所示
Surface Rendering 表面绘制
组织界面上的像素可以通过一个特定的阈值来确定
然后利用多个三角形构成的表面对选中的像素值进行覆盖,即利用Marching cubes algorithm算法进行表面绘制。
表面呈三角形排列
算法计算曲面穿过体素的位置,从一个立方体“行进”到另一个立方体
以下为代码示例,所需数据文件已经上传至网址:
% perform isosurface and patch on the L-spine or dental CT data
clear, close all
load('.\data\Lspine_data.mat')
%% image display with bone window
WC=300;
WW=1500;
figure, imshow(img(:,:,3),[WC-WW/2,WC+WW/2],'border','tight')
%% isosurface and patch
img=isotropicvol(img,imgres(1),imgres(2),imgres(3),'min');
[F,V] = isosurface(img,100);
figure
patch('Faces',F,'Vertices',V,'FaceColor',[0.89 0.85 0.79],'Edgecolor','none')
lighting gouraud
camlight(0,0)
view(-155,50)
axis equal
结果如下: