简体   繁体   English

覆盖 DICOM 中的像素数据时应替换哪些 DICOM UID?

[英]Which DICOM UIDs should be replaced while overwriting pixel data in DICOM?

I am trying to create a new DICOM file (instance) from an existing one, where I change the pixel data.我正在尝试从现有文件创建一个新的 DICOM 文件(实例),并在其中更改像素数据。

I know that I need to change some of the UIDs while replacing pixel data.我知道在替换像素数据时需要更改一些 UID。 Currently I am generating SOPInstanceUID , MediaStorageSOPInstanceUID and ReferencedSOPInstanceUID wherever applicable.目前,我正在生成SOPInstanceUIDMediaStorageSOPInstanceUIDReferencedSOPInstanceUID (只要适用)。

Are there some other UIDs that needs to be changed to get a valid DICOM file?是否需要更改其他一些 UID 才能获得有效的 DICOM 文件? It will be helpful if you can point me where to look for this in the standard.如果您能指出我在标准中的何处查找此内容,那将很有帮助。

Following is a quote from specifications discussing about uniqueness of UIDs:以下是讨论 UID 唯一性的规范引用:

Unique Identifiers (UIDs) provide the capability to uniquely identify a wide variety of items.唯一标识符 (UID) 提供了唯一标识各种项目的能力。 They guarantee uniqueness across multiple countries, sites, vendors and equipment.它们保证跨多个国家、站点、供应商和设备的唯一性。 Different classes of objects, instance of objects and information entities can be distinguished from one another across the DICOM universe of discourse irrespective of any semantic context.不同类别的对象、对象的实例和信息实体可以在 DICOM 语境中彼此区分开来,而与任何语义上下文无关。
PS 3.5 2017a - Data Structures and Encoding - 9 Unique Identifiers (UIDs) PS 3.5 2017a - 数据结构和编码 - 9 个唯一标识符 (UID)

If you are changing pixel data (changing compression (transfer syntax) to lossy or overwriting all together), you must change SOP Instance UID (0008,0018) .如果要更改像素数据(将压缩(传输语法)更改为有损或一起覆盖),则必须更改SOP Instance UID (0008,0018)

About Media Storage SOP Instance UID (0002,0003) , as you notice, it belongs to group 2 ie File Meta Information header.关于Media Storage SOP Instance UID (0002,0003) ,如您所见,它属于第 2 组,即文件元信息 header。 These tags only present when you serialize the instance to hard disk.这些标签仅在您将实例序列化到硬盘时出现。 This should have same value as that of SOP Instance UID (0008,0018) .这应该与SOP Instance UID (0008,0018)的值相同。 So, if you change one, you should also change other.所以,如果你改变了一个,你也应该改变另一个。 Please refer to this answer and following part in specifications:请参阅答案和规范中的以下部分:

C.12.1.1.1 SOP Class UID, SOP Instance UID C.12.1.1.1 SOP Class UID,SOP 实例 UID
The SOP Class UID and SOP Instance UID Attributes are defined for all DICOM IODs.为所有 DICOM IOD 定义了 SOP Class UID 和 SOP 实例 UID 属性。 However, they are only encoded in Composite IODs with the Type equal to 1. See Section C.1.2.3.但是,它们仅在类型等于 1 的复合 IOD 中编码。请参阅 C.1.2.3 部分。 When encoded they shall be equal to their respective Attributes in the DIMSE Services and the File Meta Information header (see PS3.10 Media Storage).编码时,它们应等于 DIMSE 服务和文件元信息 header 中的各自属性(参见 PS3.10 媒体存储)。
PS3.3 2021a - Information Object Definitions - C.12.1.1.1 PS3.3 2021a - 信息 Object 定义 - C.12.1.1.1

The Referenced SOP Instance UID (0008,1155) is reference to other instance. Referenced SOP Instance UID (0008,1155)是对其他实例的引用。 It depends whether you need to change this or not based on your case;这取决于您是否需要根据您的情况进行更改; generally should not be needed.一般不需要。 Please refer to this answer for more details about Referenced SOP Instance UID.有关引用的 SOP 实例 UID 的更多详细信息,请参阅答案。

The Transfer Syntax UID (0002,0010) needs to be changed according to the new Transfer Syntax you applied. Transfer Syntax UID (0002,0010)需要根据您应用的新传输语法进行更改。 While overwriting the pixel data, if you are changing it, change the UID accordingly.在覆盖像素数据时,如果要更改它,请相应地更改 UID。

The SOP Class UID (0008,0016) and Media Storage SOP Class UID (0002,0002) define your SOP Class. SOP Class UID (0008,0016)Media Storage SOP Class UID (0002,0002)定义了您的 SOP Class。 By just changing pixel data, you are not changing it.仅仅改变像素数据,你并没有改变它。 So you do not need to change this UID.所以你不需要改变这个UID。

The Implementation Class UID (0002,0012) is associated with creator. Implementation Class UID (0002,0012)与创建者相关联。 No need to change.无需更改。

Decision about Study Instance UID (0020,000D) and Series Instance UID (0020,000E) depends on your use case.关于Study Instance UID (0020,000D)Series Instance UID (0020,000E)的决定取决于您的用例。 It depends on how you want user to handle your newly created instance.这取决于您希望用户如何处理新创建的实例。 Say, while creating report for Study, many implementations do not change Study IUID but do create new Series (ie new Series IUID).比如说,在为 Study 创建报告时,许多实现不会更改 Study IUID 而是创建新系列(即新系列 IUID)。

Please refer to following answers for more details:请参阅以下答案以获取更多详细信息:
https://stackoverflow.com/a/46316162/5779732 https://stackoverflow.com/a/46316162/5779732
https://stackoverflow.com/a/53775161/5779732 https://stackoverflow.com/a/53775161/5779732

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

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