Medical Image Analysis with Deep Learning — I

利用深度学习进行医疗图像分析-Part I

我们的目标是将用在通用图像上的深度学习方法应用到医学图像中以帮助医疗。本文先从图像处理的基础知识开始讲解,包括使用pyDICOM将医学图像数据导入NumPY以及使用VTK可视化医疗数据。


简介:DICOM标准

为了便于影像信息的共享和交流,美国放射学会和美国国家电器制造商协会联合制定了医学数字图像通讯标准ACR/NEMA DICOM 3.0,其主要目的是为了在各种医疗影像产品之间提供一致性接口,以便更有效地在医学影像设备之间传输交换数字影像。DICOM标准主要由以下几部分组成:

1)概述:DICOM的概念、组成、内容及其评价。

2)兼容性: 说明了生产厂商该如何制定并描述自己的DICOM产品。包括对信息对象、服务类、以及传输协议、编码方法等的选择。

3) 信息对象定义:利用面向对象的设计方法,采用"E-R"模型,把具体事物映射到DICOM的应用范围之内。例如现实具体的患者,在DICOM中就映射为“患者IOD”,其中包括许多属性,如姓名、年龄、身高等。

4) 服务类定义:服务类是对现实中医学信息间的传递和通讯的抽象概括。

5) 数据结构和编码。

6)数据字典:数据字典给出各数据元素精确的定义,包括一个唯一标识符、一个名称、一个数据类型以及使用说明。

7)消息交换、8)、消息交换台网络支持、9)消息交换的点对点支持。


DCM文件格式

符合DICOM标准的文件通常后缀为.dcm,对于一般的DCM文件,是由若干实体构成,DCM文件的最基本组成单位是数据元素,它至少包含三项内容:数据元素标签、数据值长度、数据值体。
1). 数据元素标签:是由序列数对组成的对数据元素的唯一标识.
2). 数据值长度:此项记录是以字节为单位,记录了数据值体的长度.
3) 数据值体:包含了数据元素的属性内容,长度由数据值长度项所指定。


分析DICOM图像

Pydicom 是一个非常好的用于分析 DICOM 图像的 Python 软件包。在本节中,我会向大家介绍如何在 Jupyter notebook 上呈现 DICOM 图像。
首先安装OpenCV和pydicom包: pip install opencv-python  、pip install pydicom,之后开启jupyter notebook并新建一个工程,导入各种相关包:

这里以MyHead 数据集作为示例,下载文件到您的jupyter目录中,当然在线也可以免费获得DICOM数据集,这里有几个可以让您开始:

2.  Dicom图书馆DICOM图书馆是一个免费的在线医疗DICOM图像或视频文件共享服务,用于教育和科学目的
3. Osirix数据集: 提供通过各种成像模式获取的大量人类数据集
4. Zubal Phantom: 该网站提供了CT和MRI两个人类男性的多个数据集

我们使用os.path.walk遍历MyHead目录,并将所有.dcm文件收集到一个list命名lstFilesDCM




现在,让我们进入pydicom代码一部分。这个包的一个显着方面是,在读取DICOM文件时,它创建一个dicom.dataset.FileDataset对象,其中不同的元数据被分配给具有相同名称的对象属性。我们将在下面看到:


在第一行,我们加载第一个DICOM文件,我们将使用它作为引用的名称RefDs来提取元数据,其文件名在lstFilesDCM列表中是第一个然后,我们计算3D NumPy数组的总尺寸,其等于(切片中的像素行数)x(x,y和z笛卡尔轴)x(切片中的像素列数)x(切片数) 。最后,我们使用PixelSpacingSliceThickness属性来计算三个轴之间的像素间距。我们存储数组的维数ConstPixelDims和间距ConstPixelSpacing

下一个代码块是:

我们简单地使用 numpy.arange ConstPixelDims ConstPixelSpacing 计算这个数组的轴。接下来是最后 pydicom 一部分:

你可以看到,我们在这里做的是首先创建一个NumPy数组ArrayDicom,使用以前计算过的ConstPixelDims尺寸命名dtype这个阵列是相同dtypepixel_array基准数据集RefDs,我们最初用于提取元数据。这里的兴趣在于该pixel_array对象是一个纯NumPy数组,其中包含特定DICOM切片/图像的像素数据。因此,我们下一步将循环遍历收集的DICOM文件名,并使用该dicom.read_file函数将每个文件读入dicom.dataset.FileDataset对象。然后,我们使用该pixel_array对象的属性,并将ArrayDicom沿z轴堆叠。

最后显示图像如下:









Reference:(有改动)

1. https://medium.com/@taposhdr/medical-image-analysis-with-deep-learning-i-23d518abf531

2. https://pyscience.wordpress.com/2014/09/08/dicom-in-python-importing-medical-image-data-into-numpy-with-pydicom-and-vtk/

3. DCM图像文件格式简析

4. https://en.wikipedia.org/wiki/DICOM

5. http://dicomiseasy.blogspot.com/p/introduction-to-dicom.html

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Foreword Computational Medical Image Analysis has become a prominent field of research at the intersection of Informatics, Computational Sciences, and Medicine, supported by a vibrant community of researchers working in academics, industry, and clinical centers. During the past few years, Machine Learning methods have brought a revolution to the Computer Vision community, introducing novel efficient solutions to many image analysis problemsthat had long remained unsolved.For this revolution to enter the field of Medical Image Analysis, dedicated methods must be designed which take into account the specificity of medical images. Indeed, medical images capture the anatomy and physiology of patients through the measurements of geometrical, biophysical, and biochemical properties of their living tissues. These images are acquired with algorithms that exploit complex med- ical imaging processes whose principles must be well understood as well as those governing the complex structures and functions of the human body. The book Deep Learning for Medical Image Analysis edited by S. Kevin Zhou, Hayit Greenspan, and Dinggang Shen, top-notch researchers from both academia and industry in designing machine learning methods for medical image analysis, cov- ers state-of-the-art reviews of deep learning approaches for medical image analysis, including medical image detection/recognition, medical image segmentation, medi- cal image registration, computer aided diagnosis and disease quantification, to name some of the most important addressed problems. The book, which starts with an in- troduction to Convolutional Neural Networks for Computer Vision presents a set of novel deep learning methods applied to a variety of clinical problems and imaging modalities operating at various scales, including X-ray radiographies, Magnetic Res- onance Imaging, Computed Tomography, microscopic imaging, ultrasound imaging, etc. This impressive collection of excellent contributions will definitely se
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值