DICOM 文件格式分析 概要

本文记录了我对DICOM 3.0标准中,关于DICOM文件格式的浅薄理解

 

参考文章

http://dicom.nema.org/medical/dicom/current/output/pdf/part05.pdf

http://dicom.nema.org/medical/dicom/current/output/pdf/part06.pdf

http://dicom.nema.org/medical/dicom/current/output/pdf/part10.pdf

dicom文件tag详解_wenzhi的博客-CSDN博客

dicom文件详细解析_wenzhi的博客-CSDN博客_dicom

DICOM图像全方位解读_更上一层楼!-CSDN博客

File Meta Info

The File Meta Information includes identifying information on the encapsulated Data Set. This header consists of a 128 byte FilePreamble, followed by a 4 byte DICOM prefix, followed by the File Meta Elements shown in Table 7.1-1. This header shall be present in every DICOM file

文件信息头包含了一些特征信息,这些信息用于识别后续的存放像素数据的Data Set。

文件头由三个部分构成

  • 128字节的前导序码,或者叫序言,一般固定不变的

  • 4字节的标识符,标志这是个DICOM文件,如果校验失败,直接拒绝读取

  • 不确定长度的File Meta Elements

序言

The File Preamble is available for use as defined by Application Profiles or specific implementations. This Part of the DICOM Standard does not require any structure for this fixed size Preamble. It is not required to be structured as a DICOM Data Element with a Tag and a Length. It is intended to facilitate access to the images and other data in the DICOM file by providing compatibility with a number of commonly used computer image file formats. Whether or not the File Preamble contains information, the DICOM File content shall conform to the requirements of this Part and the Data Set shall conform to the SOP Class specified in the File Meta Information.

If the File Preamble is not used by an Application Profile or a specific implementation, all 128 bytes shall be set to 00H. This is intended to facilitate the recognition that the Preamble is used when all 128 bytes are not set as specified above.

The File Preamble may for example contain information enabling a multi-media application to randomly access images stored in a DICOM Data Set. The same file can be accessed in two ways: by a multi-media application using the preamble and by a DICOM Application that ignores the preamble.

翻译成人话就是:

  • 本标准没有对序言部分做任何限制,即便这128个字节里全是乱码,也不应该影响后续的Data Set。之所以预留这128个字节,是为了开发者新增功能时对其他图片格式的兼容,或者是一些应用的特定配置要求。

  • 如果你没有用这128个字节做一些特别的功能,务必把它们全设成00H。这样便于程序识别

  • 举个使用的例子:我希望用自己开发的一款多媒体显示器 LJJ Demo,去查看一个dcm文件,但我可能并没有严格实现DICOM协议的细节,但我又想强行打开。那么我可以在序言里加入一些字段声明该dcm文件允许 LJJ Demo 查看

标识符

The four byte DICOM Prefix shall contain the character string "DICM" encoded as uppercase characters of the ISO 8859 G0 Character Repertoire. This four byte prefix is not structured as a DICOM Data Element with a Tag and a Length

就是四个大写字母,DCIM

File Meta Elements 文件可变元素集合

注意,前面的序言和标识符其实也是两个element,只不过比较特殊,没有定义到Tag列表中。所以单拿出来讲了

 

Tag

DICOM标准对信息有很多层分类,其中有两层是这样的,第一层是Group,第二层是Element

Tag = (Group Number, Element Number) 单位是16进制

标准把所有可能的element都列成表格,配上对应的Tag,这样开发者就不能自定义属性了,所有人必须用Tag访问规定的属性

  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值