dcmjs icon indicating copy to clipboard operation
dcmjs copied to clipboard

UIDs with root 2.25 should be derived from UUID

Open hackermd opened this issue 5 years ago • 1 comments

PS 3.5 Sect B2 specifies that UIDs with root "2.25" shall be derived from a UUID. According to ITU-T X.667 this can be achieved as follows:

To obtain the single integer value of the UUID, the 16 octets of the binary representation shall be treated as an unsigned integer encoding with the most significant bit of the integer encoding as the most significant bit (bit 7) of the first of the sixteen octets (octet 15) and the least significant bit as the least significant bit (bit 0) of the last of the sixteen octets (octet 0).

hackermd avatar Apr 03 '19 19:04 hackermd

Good point - the relevant code is here:

https://github.com/dcmjs-org/dcmjs/blob/master/src/DicomMetaDictionary.js#L220-L226

Looks like the problem is pretty well addressed here:

https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript

pieper avatar Apr 03 '19 19:04 pieper