Page MenuHomePhabricator

Specify default UID generation method
Open, HighPublic


The default method for UID generation must be specified and provided that can be used when implementing IIdentifiable.

If possible it would be great if this default UID is already a valid DICOM UID and could be directly used.

  • specifiy the UID generation.
  • implement it

Related Objects

Event Timeline

floca created this task.Nov 17 2017, 10:29 AM
floca renamed this task from Specifiy default UID generation method to Specify default UID generation method.Nov 17 2017, 11:08 AM

We should improve/adapt mitk::UIDGenerator, as it is already used by mitk::DataNode and mitk::BaseData for UID generation.

Currently all DICOMPreloadedVolumeTests and DCMPreloadedVolumeTests fail because the UID isn't read but generated on the fly, resulting in different UIDs when comparing the same data loaded twice. We need to update the readers to set the UIDs.

Tests no longer fail as there is no longer a uid property.

steint added a subscriber: steint.Jan 4 2019, 11:42 AM

UID generation in general

I think UID generation is a common thing, which we should not implement on our own, but instead use a well-tested cross-platform library.

Here is a blog about some cpp libraries for UID generation:

A new library called stduuid is proposed which shall be added to the std namespace. At least the author has written a comprehensive proposal here.
The blog also mentions the Boost Uuid library and the crossguid library.

Using boost can be a fast way to get a result, because it is already included in the superbuild.
I think we should avoid being dependent on boost for too many things, as the build has sometimes trouble with Boost?


As mentioned here:

the standard defines in Part 5 (Data Structures and Encoding) UIDs in two ways:

The organizationally derived UID would require to follow a pattern which encodes the country code, organization, manufacturer, and such things.
The UUID derived UID would fit more to "...dynamically created UIDs, such as SOP Instance UIDs..." as mentioned in the standard.