Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about converting uuid to uid in oid string format #3

Open
vbaderks opened this issue Mar 2, 2018 · 2 comments
Open

Question about converting uuid to uid in oid string format #3

vbaderks opened this issue Mar 2, 2018 · 2 comments

Comments

@vbaderks
Copy link

vbaderks commented Mar 2, 2018

Hi Marius,

If I would want to use this uuid type and get a string in the ISO/IEC 9834-8 UID format, would that mean I would need to use the iterators and create that format myself, or would the std::uuid type support that format also?

Reference:
http://dicom.nema.org/dicom/2013/output/chtml/part05/sect_B.2.html
also chapter 8 of the ISO/IEC 9834-8 standard, aka: 2.25.329800735698586629295641978511506172918

Victor

@mariusbancila
Copy link
Owner

So you want the library to have a way or producing a string representation of a UUID in the format "2.25.329800735698586629295641978511506172918". Did I get that right?

ISO/IEC 9834-8 / ITU-T X.667 defines a method by which a 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).

@vbaderks
Copy link
Author

Hi Marius,

Yes, that right.
However the root "2.25" is mainly used in the medical domain (DICOM standard). A to_string function that would just return the uuid in its integer format (aka 329800735698586629295641978511506172918) would be already be helpful. Adding one of the prefixes as documented in ISO/IEC 9834-8 can then be done by the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants