Marco Eichelberg wrote:The UID generation algorithm in DCMTK may add up to 48 characters to your UID root (38 characters plus the value of an unsigned int counter), make sure that you do not break the 64 character limit on a UID
So if I would like to generate unique study UID's for instance our site UID should have a maximum of 16 charachter. Is this including the dot (separator)?
How is this unique part f the UID generated? IP number, MAC address, date, time, counter?
The UID root usually does not include the trailing ".", but if it does the trailing "." is stripped automatically. Btw, the algorithm which is used by DCMTK makes sure that the UID does not exceed the 64 characters limit -- at least this is what the algorithm should do
To your second question: This partly depends on the platform. However, the basic structure is: "<root>.<hostid>.<pid>.<time>.<counter>". See implementation of dcmGenerateUniqueIdentifier() in dcmdata/libsrc/dcuid.cc for details.
The operating system specific part is actually the <hostid> component which is based on the gethostid() system function on Posix platforms and uses some rather obscure (but necessary) code on Windows to determine the MAC address of the first ethernet adapter from which a hostid is derived.