Thursday, February 09, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: VMCCNY
New Today New Today: 18
New Yesterday New Yesterday: 26
User Count Overall: 20581

People Online People Online:
Visitors Visitors: 10
Members Members: 0
Total Total: 10

Online Now Online Now:

ClearCanvas Community Forums

Generate UIDs
Last Post 2010-03-08 01:04 PM by steve. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
martin
Senior Member
Senior Member
Posts:216

--
2010-03-05 02:56 AM  

Hi,



I was looking for a way to generate a StudyInstanceUid when I found this function: ClearCanvas.Dicom.DicomUid.GenerateUid()



I took a look at the code and wondered why you don't use System.Guid.NewGuid()and simply add the result to your root?



I don't think that it is very likely that there will be chance that your GenerateUid function will generate one UID twice but  it should not be impossible.



Imagine a program that just generates one UID and exits. If this program is called several times in a second. It should be possible that the OS assigns the same process id in  a row. This can result in duplicated UIDs.



steve
Senior Member
Senior Member
Posts:1885

--
2010-03-08 01:04 PM  

 Martin,

There is a limit of 64-characters on UIDs and character limitations where its not possible to just do an append.  You are right that there's a possibility of an OS assigning the same Process ID within a second causing issues within the UID generator.  We deemed the chance of this to be low enough that it wasn't worth coding around.

If you are interested in alternate UID generation techniques, there's a discussion about this on comp.protocols.dicom here:

groups.google.com/group/comp.protoc...1daff4bdaa

Also, the above thread references this document about generating a UID from a Guid:

 

www.dclunie.com/medical-image-faq/html/part2.html#UUID

Also, here's a reference from the OFFIS toolkit about their UID generation techniques:

forum.dcmtk.org/viewtopic.php

I hope this helps.

Steve

Real-time support available to Clinical Edition and Team Edition customers
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.