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

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

我正在尝试从现有文件创建一个新的 DICOM 文件(实例),我在其中更改了像素数据。

我知道在替换像素数据时我需要更改一些 UID。目前,我在适用的地方生成 SOPInstanceUIDMediaStorageSOPInstanceUIDReferencedSOPInstanceUID

是否需要更改其他一些 UID 才能获得有效的 DICOM 文件?如果您能指出我在标准中的何处查找此内容,将会很有帮助。

以下是规范中关于 UID 唯一性的引述:

Unique Identifiers (UIDs) provide the capability to uniquely identify a wide variety of items. 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.
PS 3.5 2017a - Data Structures and Encoding - 9 Unique Identifiers (UIDs)

如果您要更改像素数据(将压缩(传输语法)更改为有损或一起覆盖),则必须更改 SOP Instance UID (0008,0018)

关于 Media Storage SOP Instance UID (0002,0003),如您所见,它属于第 2 组,即文件元信息 header。这些标签仅在您将实例序列化到硬盘时出现。这应该与 SOP Instance UID (0008,0018) 具有相同的值。所以,如果你改变了一个,你也应该改变另一个。请参考this答案和规范中的以下部分:

C.12.1.1.1 SOP Class UID, SOP Instance UID
The SOP Class UID and SOP Instance UID Attributes are defined for all DICOM IODs. However, they are only encoded in Composite IODs with the Type equal to 1. See Section 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).
PS3.3 2021a - Information Object Definitions - C.12.1.1.1

Referenced SOP Instance UID (0008,1155) 是对其他实例的引用。这取决于您是否需要根据您的情况进行更改;一般不需要。请参阅 this 答案以获取有关引用的 SOP 实例 UID 的更多详细信息。

Transfer Syntax UID (0002,0010) 需要根据您应用的新传输语法进行更改。覆盖像素数据时,如果要更改它,请相应地更改 UID。

SOP Class UID (0008,0016)Media Storage SOP Class UID (0002,0002) 定义了您的 SOP Class。通过仅仅改变像素数据,你并没有改变它。所以你不需要改变这个UID。

Implementation Class UID (0002,0012) 与创建者关联。无需更改。

关于 Study Instance UID (0020,000D)Series Instance UID (0020,000E) 的决定取决于您的用例。这取决于您希望用户如何处理您新创建的实例。比如说,在为研究创建报告时,许多实现不会更改研究 IUID,但会创建新系列(即新系列 IUID)。

详情请参考以下回答:
https://whosebug.com/a/46316162/5779732
https://whosebug.com/a/53775161/5779732