| 5 | 1/1 | 返回列表 |
| 查看: 505 | 回復(fù): 2 | ||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | ||
yyhmbb銀蟲 (初入文壇)
|
[求助]
matlab程序求助 已有1人參與
|
|
| 本人現(xiàn)有一組ct掃描圖片,想把它變成三維數(shù)值圖,區(qū)分里面的不同物質(zhì)。急求。 |

|
你這個(gè)問(wèn)題解決了沒(méi)有。我知道有些方法可以幫到你,首先我推薦你使用專業(yè)軟件來(lái)處理這些數(shù)據(jù),比如Avizo和mimics。另外,如果非得用matlab處理,我看了下是tif文件(不是dicom的),可以參照下面這個(gè)帖子。http://au.mathworks.com/help/images/examples/exploring-slices-from-a-3-dimensional-mri-data-set.html 另外,找了個(gè)mri的代碼,你自己研究下吧 %% mriplot.m % Click on any the three MRI images and press "ENTER" to change slices at new [x,y,z] positions. % Press "ESC" and press "ENTER" to exit. % by Binlin Wu -- CCNY % bwu@sci.ccny.cuny.edu % 09/14/2010 load mri.mat; D1=double(squeeze(D)); DIM = size(D1); [X,Y,Z]=meshgrid(1:DIM(2),1:DIM(1),1:DIM(3)); h1=subplot(2,2,1);imagesc(D1(:,:,round(DIM(3)/2)),[min(D1(:)) max(D1(:))]);colormap(gray);title('axial');colorbar; xlabel('x');ylabel('y') h2=subplot(2,2,2);imagesc(squeeze(D1(:,round(DIM(2)/2),:)),[min(D(:)) max(D(:))]);colormap(gray);title('sagittal');colorbar; xlabel('z');ylabel('y') h3=subplot(2,2,3);imagesc(squeeze(D1(round(DIM(1)/2),:,:)),[min(D(:)) max(D(:))]);colormap(gray);title('coronal');colorbar; xlabel('z');ylabel('x') subplot(2,2,4);slice(X,Y,Z,D1,64,64,14);colormap(gray);shading flat;title('3D Slices') xlabel('x');ylabel('y');zlabel('z'); x=round(DIM(2)/2);y=round(DIM(1)/2);z=round(DIM(3)/2); button = 0; while(1) try [A,B,button]=ginput catch return end if length(A)==0 A=14;B=64;button=0; end A=A(end); B=B(end); button=button(end); A=ceil(A-0.5); B=ceil(B-0.5); if button==27 break; end if gca==h1 x=A; y=B; if x<=0 || x>DIM(2) || y<=0 || y>DIM(1) continue end axes(h2);imagesc(squeeze(D1(:,x,:)),[min(D(:)) max(D1(:))]);colormap(gray);title('sagittal');colorbar; xlabel('z');ylabel('y') axes(h3);imagesc(squeeze(D1(y,:,:)),[min(D(:)) max(D1(:))]);colormap(gray);title('coronal');colorbar; xlabel('z');ylabel('x') subplot(2,2,4);slice(X,Y,Z,D1,x,y,z);colormap(gray);shading flat;title('3D Slices') xlabel('x');ylabel('y');zlabel('z'); elseif gca==h2 z=A; y=B; if z<=0 || z>DIM(3) || y<=0 || y>DIM(1) continue end axes(h1);imagesc(D1(:,:,z),[min(D1(:)) max(D1(:))]);colormap(gray);title('axial');colorbar; xlabel('x');ylabel('y') axes(h3);imagesc(squeeze(D1(y,:,:)),[min(D1(:)) max(D1(:))]);colormap(gray);title('coronal');colorbar; xlabel('z');ylabel('x') subplot(2,2,4);slice(X,Y,Z,D1,x,y,z);colormap(gray);shading flat;title('3D Slices') xlabel('x');ylabel('y');zlabel('z'); elseif gca==h3 z=A; x=B; if x<=0 || x>DIM(2) || z<=0 || z>DIM(3) continue end axes(h1);imagesc(D1(:,:,z),[min(D1(:)) max(D1(:))]);colormap(gray);title('axial');colorbar; xlabel('x');ylabel('y') axes(h2);imagesc(squeeze(D1(:,x,:)),[min(D1(:)) max(D1(:))]);colormap(gray);title('sagittal');colorbar; xlabel('z');ylabel('y') subplot(2,2,4);slice(X,Y,Z,D1,x,y,z);colormap(gray);shading flat;title('3D Slices') xlabel('x');ylabel('y');zlabel('z'); end end |

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 286求調(diào)劑 +16 | PolarBear11 2026-03-26 | 16/800 |
|
|---|---|---|---|---|
|
[考研] 08生物與醫(yī)藥專碩初試346找調(diào)劑 +4 | dianeeee 2026-04-01 | 5/250 |
|
|
[考研] 08工科275分求調(diào)劑 +12 | AaAa7420 2026-03-31 | 12/600 |
|
|
[考研] 求調(diào)劑 +4 | 圖鑒212 2026-03-30 | 5/250 |
|
|
[考研] 一志愿鄭大085600,310分求調(diào)劑 +6 | 李瀟可 2026-03-26 | 6/300 |
|
|
[考研] 一志愿華南師范361分,化學(xué)求調(diào)劑 +4 | Nicole88888 2026-04-01 | 4/200 |
|
|
[考研] 288資源與環(huán)境專碩求調(diào)劑,不限專業(yè),有學(xué)上就行 +25 | lllllos 2026-03-30 | 26/1300 |
|
|
[考研] 初試301,代碼085701環(huán)境工程,本碩一致,四六級(jí)已過(guò),有二區(qū)一作,共發(fā)表5篇論文 +3 | axibli 2026-04-01 | 3/150 |
|
|
[考研] 318求調(diào)劑 +10 | 陳晨79 2026-03-30 | 10/500 |
|
|
[考研] 080500-315分復(fù)試調(diào)劑 +9 | 上岸3821 2026-03-31 | 9/450 |
|
|
[考研] 343求調(diào)劑 +8 | 愛(ài)羈絆 2026-03-28 | 8/400 |
|
|
[考研] 313求調(diào)劑 +6 | 賣個(gè)關(guān)子吧 2026-03-31 | 6/300 |
|
|
[考研] 抱歉 +4 | 田洪有 2026-03-30 | 4/200 |
|
|
[考研] 285求調(diào)劑 +6 | AZMK 2026-03-29 | 9/450 |
|
|
[考研] 一志愿北京化工大學(xué)材料與化工(085600)296求調(diào)劑 +25 | 稻妻小編 2026-03-26 | 25/1250 |
|
|
[考研] 071010 323 分求調(diào)劑 +3 | Baekzhy 2026-03-27 | 3/150 |
|
|
[考研] 復(fù)試調(diào)劑 +3 | raojunqi0129 2026-03-28 | 3/150 |
|
|
[考研] 復(fù)試調(diào)劑,一志愿南農(nóng)083200食品科學(xué)與工程 +5 | XQTJZ 2026-03-26 | 5/250 |
|
|
[考研] 考研調(diào)劑 +9 | 小蠟新筆 2026-03-26 | 9/450 |
|
|
[考研] 環(huán)境專碩324分求調(diào)劑推薦 +5 | 軒小寧—— 2026-03-26 | 5/250 |
|