医工互联

 找回密码
 注册[Register]

手机动态码快速登录

手机号快速登录

微信登录

微信扫一扫,快速登录

QQ登录

只需一步,快速开始

查看: 294|回复: 0
收起左侧

CHP1-医学影像处理概述-案例一DICOM格式读取

[复制链接]

  离线 

发表于 2023-8-12 07:05:11 | 显示全部楼层 |阅读模式 <
一、医学影像研究领域

2019年1月上海交大发布《人工智能医疗白皮书》 ——全国19个省市已发布人工智能规划,AI医学影像成中国人工智能医疗最成熟领域。
人工智能在医疗领域应用情况主要包括:医学影像、辅助诊断、药物研发、健康管理、疾病预测在内的五大应用领域。
国外以AI药物研发为主,中国则借助医疗影像大数据及图像识别技术的发展优势,以AI医学影像为主。
1、医学成像系统(medical imaging system 指图像形成的过程,包括成像机理、成像设备、成像系统的分析等问题。
2、医学影像处理medical image processing指对已获得的图像作进一步处理,包括图像增强、图像分割、图像重建、图像恢复、图像滤波等问题。
二、医学成像系统

1.png

三、DICOM格式文件的读取

1、Matlab读取单张DICOM格式文件,并显示影像和具体信息
  1. clc;
  2. clear;
  3. close all;
  4. I = dicomread('000000.dcm');
  5. figure;
  6. imshow(I);
  7. figure;
  8. imshow(I,[100 2048]);
  9. figure;
  10. imshow(I,[512 2048]);
  11. figure;
  12. imshow(I,[1024 2048]);
  13. figure
  14. subplot(2,2,1);
  15. imshow(I);
  16. subplot(2,2,2);
  17. imshow(I,[100,2048]);
  18. subplot(2,2,3);
  19. imshow(I,[512 2048]);
  20. subplot(2,2,4);
  21. imshow(I,[1024 2048]);
  22. % 查看该DICOM影像的具体信息
  23. print('DICOM图像具体信息');
  24. info = dicominfo('000000.dcm');
复制代码
注意:由于DICOM影像的灰阶较高,往往会超过两千个灰阶,因此通常无法显示最合适的窗口窗位,可以通过调节显示灰阶范围改变影像的显示效果。
2、Python取得DICOM格式文件
1)利用simpleITK
  1. # read a single dicom by simpleitk
  2. import numpy as np
  3. import SimpleITK as sitk
  4. import matplotlib.pyplot as plt
  5. # read a dicom file
  6. dicom = sitk.ReadImage(r'000000.dcm')
  7. image = np.squeeze(sitk.GetArrayFromImage(dicom))
  8. # get image array
  9. plt.imshow(image,'gray')
  10. plt.show()
复制代码
2)利用pydicom
  1. # read a single dicom by pydicom
  2. import pydicom
  3. import matplotlib.pyplot as plt
  4. from matplotlib import pylab
  5. # read a dicom file
  6. dicom = pydicom.read_file(r'000000.dcm')
  7. # print all dicom tags
  8. print(dicom.dir())
  9. # print all dicom tags with 'patient'
  10. print(dicom.dir('patient'))
  11. # print specified dicom tags
  12. print(dicom.PatientName, dicom.PatientSex, dicom.PatientID, dicom.PatientBirthDate)
  13. # get the dicom image array
  14. image = dicom.pixel_array
  15. # show image
  16. plt.imshow(image, cmap=pylab.cm.bone)
  17. plt.show()
复制代码
注意:首先要安装simpleITK或者pydicom库
回复

使用道具 举报

提醒:禁止复制他人回复等『恶意灌水』行为,违者重罚!
您需要登录后才可以回帖 登录 | 注册[Register] 手机动态码快速登录 微信登录

本版积分规则

发布主题 快速回复 收藏帖子 返回列表 客服中心 搜索
简体中文 繁體中文 English 한국 사람 日本語 Deutsch русский بالعربية TÜRKÇE português คนไทย french

QQ|RSS订阅|小黑屋|处罚记录|手机版|联系我们|Archiver|医工互联 |粤ICP备2021178090号 |网站地图

GMT+8, 2024-9-17 04:10 , Processed in 0.297121 second(s), 66 queries .

Powered by Discuz!

Copyright © 2001-2023, Discuz! Team.

快速回复 返回顶部 返回列表