简体   繁体   English

DICOM-传输语法足以进行数据集解码吗?

[英]DICOM - Is Transfer Syntax sufficient for DataSet decoding?

I'm trying to determine the proper way to spread competence between DICOM processing modules. 我正在尝试确定在DICOM处理模块之间分配能力的正确方法。 One of the steps is to "take the dataset out of the envelope" by which I mean to decode attributes based on the transfer syntax. 步骤之一是“从信封中取出数据集”,我的意思是根据传输语法对属性进行解码。 Two things i cannot understand: 我无法理解的两件事:

  1. DICOM Table 6.2-1. DICOM表6.2-1。 DICOM Value Representations gives a requirements, that the value codes must meet in order to be concideret valid (ex. no control characters in AE). DICOM值表示法提出了一个要求,即值码必须符合才能有效确认(例如AE中没有控制字符)。 However, some of the VRs depend on the Character Set defined by (0008,0005) - also a member of the "envelope". 但是,某些VR依赖于(0008,0005)定义的字符集-也是“信封”的成员。 Isn't it a contradiction? 这不是矛盾吗?
  2. "Data Element (7FE0,0010) Pixel Datawhere Bits Allocated (0028,0100) has a value less than or equal to 8 shall have the Value Representation OB or OW and shall be encoded in Little Endian." “数据元素(7FE0,0010)像素数据(其中分配的位(0028,0100)的值小于或等于8的值)应具有值表示OB或OW,并应使用Little Endian进行编码。” This sentence occurs a several times in the standard. 该句子在标准中出现几次。 How can I determine whether to swap bytes? 如何确定是否交换字节? (not looking at BitsAllocated - a member of the envelope) (不查看BitsAllocated-信封的成员)

Am I missing something, or is it really necessary to interpret some Data Elements from Data Set in order to validate other in the DICOM File, and Data Structure? 我是否缺少某些内容,还是真的有必要从数据集中解释一些数据元素以验证DICOM文件和数据结构中的其他元素?

EDIT: Let me refrase my problem: 编辑:让我来解决我的问题:

Most of the times, transfer syntax is sufficient to decode(decompress) Pixel Data and flatten endiannes to the prefered format. 在大多数情况下,传输语法足以解码(解压缩)像素数据并将扁平化字节整理为首选格式。 Thats before any high bit/bits alloc/bits stored transformations and following modality -> voi). 那就是在任何高位/位分配/位存储的转换之前,然后是模态-> voi)。

But in the case of Pixel Data stored in VR=OW - we don't know whether to swap bytes or not, because we dont know if the image has bits allocated 8 or more (its also being decoded right now (endian swapped, vr validated)). 但是对于像素数据存储在VR = OW中的情况-我们不知道是否交换字节,因为我们不知道图像是否分配了8位或更多位(它现在也已解码(字节序交换,vr已验证))。

The story with strings is similar. 带弦的故事是相似的。

EDIT: The answer to OW problem was here: Is the "Other Word" VR legal for an 8-bit RGB image? 编辑:OW问题的答案在这里: 对于8位RGB图像,“ Other Word” VR是否合法?

My last problem is: How to chcek wether VR=LO element does not contain any control characters, without knowing what the (0008,0005) Character Set is? 我的最后一个问题是:如何在不知道(0008,0005)字符集是什么的情况下,如何使VR = LO元素不包含任何控制字符? (as it might not be encoded yet too) (因为它可能还没有被编码)

If the transfer syntax specifies a Jpeg image then you don't need much more because most of the information is in the jpeg stream. 如果传输语法指定了Jpeg图片,则您不需要太多,因为大多数信息都在jpeg流中。

For all the transfer syntaxes you need to know: 对于所有传输语法,您需要了解:

  • the photometric interpretation (but pay attention to some WRONG dataset that specify a RGB photometric instead of YBR). 光度解释(但要注意某些WRONG数据集,该数据集指定RGB光度而不是YBR)。 MONOCHROME or MONOCHROME2 specify if the minimum pixel value represents white or black MONOCHROME或MONOCHROME2指定最小像素值代表白色还是黑色

Additionally, for DICOM transfer syntax and lossless JPEG you also need to know: 此外,对于DICOM传输语法和无损JPEG,您还需要了解:

  • bits allocated 分配的位
  • high bit 高位
  • the integer type (signed/unsigned) 整数类型(有符号/无符号)

For DICOM transfer syntax you also need to know: 对于DICOM传输语法,您还需要了解:

  • big endian or little endian to reverse the bytes when the data type is OW 当数据类型为OW时,big endian或little endian反转字节

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM