24小时热门版块排行榜    

Znn3bq.jpeg
查看: 517  |  回复: 2

yyhmbb

银虫 (初入文坛)

[求助] matlab程序求助 已有1人参与

本人现有一组ct扫描图片,想把它变成三维数值图,区分里面的不同物质。急求。
回复此楼

» 本帖附件资源列表

  • 欢迎监督和反馈:小木虫仅提供交流平台,不对该内容负责。
    本内容由用户自主发布,如果其内容涉及到知识产权问题,其责任在于用户本人,如对版权有异议,请联系邮箱:xiaomuchong@tal.com
  • 附件 1 : ct图片.rar
  • 2015-07-01 10:11:16, 8.07 M

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xmxangel

新虫 (初入文坛)

【答案】应助回帖

你这个问题解决了没有。我知道有些方法可以帮到你,首先我推荐你使用专业软件来处理这些数据,比如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
Nogainisslighttobother.
2楼2015-08-20 23:09:06
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

永久的萤火虫

金虫 (小有名气)

楼主,您好,看到您的这个帖子,我们两个的研究内容有相似之处,刚入门,学起来有点吃力,还望楼主能不吝赐教,相互学习。。谢谢。方便的还望您能加下我的QQ528880215.谢谢您
追求不同,所以要求不同
3楼2016-01-08 10:17:30
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 yyhmbb 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 初试324 中药学 一志愿天中医 求调剂 +4 李的Lucky 2026-04-10 4/200 2026-04-16 09:22 by fqwang
[考研] 恳请有学校收留 +6 柯淮然 2026-04-12 6/300 2026-04-16 07:23 by 学员JpLReM
[考研] 284求调剂 +21 让我上岸吧阿西 2026-04-09 21/1050 2026-04-15 21:53 by noqvsozv
[考博] 26年电池方向博士申请 10+3 15615939259 2026-04-09 4/200 2026-04-15 14:22 by kwansei
[考研] 085801电气专硕272求调剂 +19 电气李 2026-04-13 21/1050 2026-04-15 13:37 by 黑科技矿业
[考研] 求调剂 +16 雪逢冬 2026-04-10 16/800 2026-04-14 14:27 by 逆水乘风
[考研] 300分求调剂 (085501机械专硕,本科扬大) +9 xu@841019 2026-04-11 10/500 2026-04-14 08:48 by 木木mumu~
[考研] 机械还有还有名额吗?太难了 +8 笑笑袁 2026-04-10 8/400 2026-04-14 08:44 by screening
[考研] 22408 352分求调剂 +5 努力的夏末 2026-04-09 5/250 2026-04-12 19:17 by wj165256
[考研] 一志愿华中农微生物,288分,三年实验经历 +11 代fish 2026-04-09 11/550 2026-04-12 10:21 by Hayaay
[考研] 085410 273求调剂 +10 X1999 2026-04-09 10/500 2026-04-12 09:24 by 逆水乘风
[考研] 化工调剂求导师收留!一志愿失利,踏实肯干,有植物提取科研经历 +20 yzyzx 2026-04-09 21/1050 2026-04-12 00:12 by 小小小小啦啦啦
[考研] 270求调剂 +14 杨乐369 2026-04-11 14/700 2026-04-11 20:16 by 蓝云思雨
[考研] 352 求调剂 +6 yzion 2026-04-11 8/400 2026-04-11 16:24 by 明月此时有
[考研] 085410 273分调剂 +4 X1999 2026-04-09 4/200 2026-04-11 13:05 by pies112
[考研] 085600材料与化工329分求调剂 +16 叶zilin 2026-04-10 16/800 2026-04-11 11:04 by may_新宇
[考研] 085410-273求调剂 +6 X1999 2026-04-10 6/300 2026-04-11 10:32 by Delta2012
[考研] 一志愿北理工298英一数二已上岸,感谢各位老师 +14 Reframe 2026-04-10 16/800 2026-04-10 23:07 by caotw2020
[考研] 263能源动力专硕求调剂 +3 加大号饭盒袋 2026-04-10 3/150 2026-04-10 22:23 by 286640313
[考研] 求调剂 +5 不会飞的鱼@ 2026-04-10 5/250 2026-04-10 19:07 by chemisry
信息提示
请填处理意见