dicom医学图像处理

  • content
    {:toc}

实验目的

最大灰度投影(MIP)是临床上最常见的一种血管成像方式,要求将三维数据沿z轴投影。

实验提示

将每层DICOM图像对应位置像素点依次比较取最大。

实验平台

MATLAB

实验代码


clear all
clc
close all
file_path =  'E:data'; % 图像文件夹路径  
img_path_list = dir(strcat(file_path,'*.dcm'));%获取该文件夹中所有dcm格式的图像  
img_num = length(img_path_list);%获取图像总数量  
imagemax = img_path_list(1).name;% 图像名
imagemax =dicomread(strcat(file_path,imagemax)); 
%%dcm变成灰度图
for w=1:400
    for u=1:400
        tmp=double(imagemax(w,u));
        imagemax(w,u)=uint8(255*(tmp-17)/2407);
    end
end
%%比较
        for j = 1:img_num %逐一读取图像  
            image_name = img_path_list(j).name;% 图像名
            image =dicomread(strcat(file_path,image_name));
            for c=1:400
                for d=1:400
                    tem=double(image(c,d));
                    image(c,d)=uint8(255*(tem-17)/2407);
                end
            end
            for m=1:400
                for n=1:400
                    imagemax(m,n)=max(image(m,n),imagemax(m,n));
                end
            end
        end  
imshow(imagemax,[]);

实验截图

DICOM医学图像