| 3 | 1/1 | 返回列表 |
| 查看: 486 | 回復: 2 | |||
[求助]
matlab程序求助 已有1人參與
|
| 本人現(xiàn)有一組ct掃描圖片,想把它變成三維數(shù)值圖,區(qū)分里面的不同物質(zhì)。急求。 |
|
你這個問題解決了沒有。我知道有些方法可以幫到你,首先我推薦你使用專業(yè)軟件來處理這些數(shù)據(jù),比如Avizo和mimics。另外,如果非得用matlab處理,我看了下是tif文件(不是dicom的),可以參照下面這個帖子。http://au.mathworks.com/help/images/examples/exploring-slices-from-a-3-dimensional-mri-data-set.html 另外,找了個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 |


| 3 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 一志愿北京化工大學070300 學碩336求調(diào)劑 +3 | vv迷 2026-03-21 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 一志愿西安交通大學材料工程專業(yè) 282分求調(diào)劑 +10 | 楓橋ZL 2026-03-18 | 12/600 |
|
|
[考研] 材料與化工(0856)304求B區(qū)調(diào)劑 +3 | 邱gl 2026-03-20 | 7/350 |
|
|
[考研] 296求調(diào)劑 +4 | www_q 2026-03-20 | 4/200 |
|
|
[基金申請]
學校已經(jīng)提交到NSFC,還能修改嗎?
40+4
|
babangida 2026-03-19 | 9/450 |
|
|
[考研] 0805材料320求調(diào)劑 +3 | 深海物語 2026-03-20 | 3/150 |
|
|
[考研] 材料學學碩080502 337求調(diào)劑-一志愿華中科技大學 +4 | 順順順mr 2026-03-18 | 5/250 |
|
|
[考研] 070300化學319求調(diào)劑 +7 | 錦鯉0909 2026-03-17 | 7/350 |
|
|
[考研] 265求調(diào)劑 +3 | Jack?k?y 2026-03-17 | 3/150 |
|
|
[考研]
|
.6lL 2026-03-18 | 8/400 |
|
|
[考研] 一志愿西南交大,求調(diào)劑 +5 | 材化逐夢人 2026-03-18 | 5/250 |
|
|
[考研] 一志愿南昌大學,327分,材料與化工085600 +9 | Ncdx123456 2026-03-19 | 9/450 |
|
|
[考研] 材料學碩297已過四六級求調(diào)劑推薦 +11 | adaie 2026-03-19 | 11/550 |
|
|
[考研] 0817 化學工程 299分求調(diào)劑 有科研經(jīng)歷 有二區(qū)文章 +22 | rare12345 2026-03-18 | 22/1100 |
|
|
[考研] 295材料求調(diào)劑,一志愿武漢理工085601專碩 +5 | Charlieyq 2026-03-19 | 5/250 |
|
|
[考研] 085410人工智能專碩317求調(diào)劑(0854都可以) +4 | xbxudjdn 2026-03-18 | 4/200 |
|
|
[考研] 085601材料工程專碩求調(diào)劑 +10 | 慕寒mio 2026-03-16 | 10/500 |
|
|
[考研] 收復試調(diào)劑生 +4 | 雨后秋荷 2026-03-18 | 4/200 |
|
|
[考研] 312求調(diào)劑 +8 | 陌宸希 2026-03-16 | 9/450 |
|
|
[考研] 293求調(diào)劑 +11 | zjl的號 2026-03-16 | 16/800 |
|