gpt4 book ai didi

dicom - 如何生成唯一的DICOM UID?

转载 作者:行者123 更新时间:2023-12-04 05:41:34 26 4
gpt4 key购买 nike

我正在处理DICOM门控(PET)数据。
我想人为地创建一个包含门控数据的DICOM图像系列。我正在查询SOPInstanceUID的增量值,该增量值标记了每个相位或门中的每个图像切片。

对于门中的每个切片,这些值具有不同的值,并且在门之间递增。但是我找不到如何选择此值的逻辑。

是否有关于在何处以及如何写入这些值的引用?

最佳答案

Multiple algorithms to generate DICOM UID are explained in this answer with their drawbacks.



根据DICOM specifications,包括所讨论的SOPInstanceUID在内的所有UID都应该是唯一的。这与您正在处理的数据(门控PET数据或其他数据)无关。

以下是规范说明:

2017a Part 5 - Data Structures and Encoding (9 Unique Identifiers (UIDs))

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.



UID由两部分组成:
  • 组织根:
    UID的这一部分确保了整个组织的唯一性。有些服务提供商免费提供此服务。我所知道的是Medical Connections。您可以contact他们免费获得。
  • 后缀:
    此外,您应该以保证组织内部唯一性的方式生成后缀。

  • 以下是DICOM UID的常规 rules:

    1. Total length must be <= 64 characters, including the stops
    2. Must contain only digits 0-9 and full stops
    3. Each numeric "component" (between stops) must be a valid and unambiguous integer number, and so must not have a leading zero (unless the whole component is zero)
    4. Must be guaranteed to be unique - this means:
      • It must be derived from a proper official root under your sole control.
      • It must not be created by appending digits (however special you consider the combination!) to someone else's UID.
      • In particular, series UIDs for secondary capture images, KIN objects etc. must not be created as derivatives of the Study UID (unless you own that root!)
    5. Related to the above, there is no expectation or requirement that the Study UID, Series UID and Instance UID for images should be derived from the same root (though in practice, Series UID and Instance UID normally are, as both must be generated internally by the equipment which generates the images)
    6. Date and Time are useful for generating UIDs, but only if:
      • Each machine has a unique root (normally your company UID root + a machine specific suffix such as a serial number
      • If it is possible for UIDs to be generated at > 1 per second, then a sequential counter should also be used
      • if on a multi-threaded machine, then the thread ID or a properly interlocked counter are needed to prevent 2 applications or 2 threads in the same application from generating identical UIDs simultaneously.
      • Do not use time on its own - it is too easy to end up with a leading zero 0 - e.g. 20060724.093017 use instead 20060724093017


    可以在 specifications中找到相同的内容。

    以下示例来自DICOM规范以生成UID。请注意,这是 内容丰富的部分。

    2017a Part 5 - Data Structures and Encoding (B Creating a Privately Defined Unique Identifier (Informative))

    B.1 Organizationally Derived UID:

    The following example presents a particular choice made by a specific organization in defining its suffix to guarantee uniqueness of a SOP Instance UID.

    "1.2.840.xxxxx.3.152.235.2.12.187636473"

    In this example, the root is:

    • 1 Identifies ISO
    • 2 Identifies ANSI Member Body
    • 840 Country code of a specific Member Body (U.S. for ANSI)
    • xxxxx Identifies a specific Organization.(assigned by ANSI)

    In this example the first two components of the suffix relate to the identification of the device:

    • 3 Manufacturer defined device type
    • 152 Manufacturer defined serial number

    The remaining four components of the suffix relate to the identification of the image:

    • 235 Study number
    • 2 Series number
    • 12 Image number
    • 187636473 Encoded date and time stamp of image acquisition

    In this example, the organization has chosen these components to guarantee uniqueness. Other organizations may choose an entirely different series of components to uniquely identify its images. For example it may have been perfectly valid to omit the Study Number, Series Number and Image Number if the time stamp had a sufficient precision to ensure that no two images might have the same date and time stamp. Because of the flexibility allowed by the DICOM Standard in creating organizationally derived UIDs, implementations should not depend on any assumed structure of UIDs and should not attempt to parse UIDs to extract the semantics of some of its components.



    规范中还提到了另一种方法

    2017a Part 5 - Data Structures and Encoding (B Creating a Privately Defined Unique Identifier (Informative))

    B.2 UUID Derived UID:

    UID may be constructed from the root "2.25." followed by a decimal representation of a Universally Unique Identifier (UUID). That decimal representation treats the 128 bit UUID as an integer, and may thus be up to 39 digits long (leading zeros must be suppressed).
    A UUID derived UID may be appropriate for dynamically created UIDs, such as SOP Instance UIDs, but is usually not appropriate for UIDs determined during application software design, such as private SOP Class or Transfer Syntax UIDs, or Implementation Class UIDs.

    关于dicom - 如何生成唯一的DICOM UID?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46304306/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com