-1
我在一個文件夾中有近80個dicom圖像。現在,我想將這些dicom系列圖像轉換爲三維圖像。如何將Dicom目錄(一系列dicom圖像)轉換爲3D捲圖像?
下面是加載MRI數據,形成計數器切片,然後生成三維體積的代碼。但是,它會加載內置的MRI圖像。
如何更改此程序從我的文件夾加載dicom圖像並顯示三維體積?
load mri
D = squeeze(D);
%figure
colormap(map)
image_num = 8;
image(D(:,:,image_num))
axis image
x = xlim;
y = ylim;
cm = brighten(jet(length(map)),-.5);
figure
colormap(cm)
contourslice(D,[],[],image_num)
axis ij
xlim(x)
ylim(y)
daspect([1,1,1])
figure
colormap(cm)
contourslice(D,[],[],[1,12,19,27],8);
view(3);
axis tight
figure
colormap(map)
Ds = smooth3(D);
hiso = patch(isosurface(Ds,5),...
'FaceColor',[1,.75,.65],...
'EdgeColor','none');
isonormals(Ds,hiso)
hcap = patch(isocaps(D,5),...
'FaceColor','interp',...
'EdgeColor','none');
view(35,30)
axis tight
daspect([1,1,.4])
lightangle(45,30);
lighting gouraud
hcap.AmbientStrength = 0.6;
hiso.SpecularColorReflectance = 0;
hiso.SpecularExponent = 50;