Friday, July 30, 2010
Google Custom Search

Go to...

Recent Forum Posts

Our Community

Membership Membership:
Latest New User Latest: clim7777
New Today New Today: 11
New Yesterday New Yesterday: 18
User Count Overall: 10082

People Online People Online:
Visitors Visitors: 10
Members Members: 1
Total Total: 11

Online Now Online Now:
01: cmpellison

ClearCanvas Community Forums

"Invalid" study UID fix
Last Post 2009-12-11 05:45 PM by jasper.yeh. 3 Replies.
Printer Friendly
Sort:
NextNext
You are not authorized to post a reply.
Author Messages
tommy
Veteran Member
Veteran Member
Posts:73

--
2009-12-05 03:14 PM  

In our use of cc, we've come across a few studies with invalid UIDs, involving two periods in a row, such as

1.3.12.2.1107.5.8.2..200912223559125.9072

Such studies store & display OK in efilm.

Not sure if it is necessarily an "error" to choke on such UIDs, but we've seen this a few times, and eFlm doesnt choke on it.

With the following 1-character change in cc source code, such studies now store and display OK for us:

Change the following line in Dicom/Validation/DicomValidator.cs

_uidValidationRegex = new Regex("^[0-9]+([\\.][0-9]+)*$");

to

_uidValidationRegex = new Regex("^[0-9]+([\\.]+|[0-9]+)*$");

 

 

— End of inner exception stack trace —

2009-12-03 00:13:27,359 [Pool:15] ERROR - Exception thrown
System.Exception: The file cannot be inserted into the Data Store (.\dicom_interim\jbg05osg.wld.dcm). The file has been moved to C:\ClearCanvas\workstation\badfiles\jv5hj0xd.awz ---> ClearCanvas.Dicom.DicomDataException: Invalid Study Instance UID: Invalid DICOM UID format: 1.3.12.2.1107.5.8.2..200912223559125.9072
at ClearCanvas.Dicom.Validation.DicomValidator.ValidateStudyInstanceUID(String uid)
at ClearCanvas.Dicom.DataStore.Data— End of inner exception stack trace —
2009-12-03 00:13:27,359 [Pool:15] ERROR - Exception thrown
System.Exception: The file cannot be inserted into the Data Store (.\dicom_interim\jbg05osg.wld.dcm). The file has been moved to C:\ClearCanvas\workstation\badfiles\jv5hj0xd.awz ---> ClearCanvas.Dicom.DicomDataException: Invalid Study Instance UID: Invalid DICOM UID format: 1.3.12.2.1107.5.8.2..200912223559125.9072
at ClearCanvas.Dicom.Validation.DicomValidator.ValidateStudyInstanceUID(String uid)
at ClearCanvas.Dicom.DataStore.DataAccessLayer.DicomPersistentStoreValidator.Validate(DicomFile dicomFile)
at ClearCanvas.ImageViewer.Shreds.LocalDataStore.LocalDataStoreService.DicomFileImporter.ParseFile(ImportJobInformation jobInformation)
— End of inner exception stack trace —

 

 

radyworks
Basic Member
Basic Member
Posts:21

--
2009-12-06 03:16 PM  
Hi Tommy,

That contribution back to the community is highly appreciated. I will update my source as well.

with regards
Ravindran Padmanabhan.
jasper.yeh
Senior Member
Senior Member
Posts:420
Avatar

--
2009-12-11 05:41 PM  
Hi Everyone,

The format of a DICOM UID does not allow for the inclusion of two periods in a row. Our current position at ClearCanvas is that we should strive to uphold the DICOM Standard as much as we possibly can.

However, we do recognize that there are DICOM instances out there that do not strictly adhere to the DICOM Standard (particularly in research environments) and so we have included a switch to disable SOP validation for the sole purpose of viewing the image. This switch can be found under Tools / Utilities / Configure Settings, SopValidationSettings group. The setting for disable validation can be set to True, and then validation will not be performed on opening images. This will not disable validation for DICOM data store related tasks, including import and send. We also took the decision to not continue to propagate invalid DICOM any further, and that includes restricting it from any operations which may cause the bad UID to be transmitted beyond our control.

You are, of course, free to modify the source code anyway you wish, but we might not be able to fix this at present. Please let us know if you have any thoughts on this topic as well - do you agree/disagree with our position from your point of view as a clinician, a researcher, ...? Are there other use cases we haven't considered?

Thanks,


(Technical Note: We cannot "fix" bad UIDs - if we reassign a new UID, then the instance might lose any links it had with other instances bearing the same UID. If we drop the extra period, then we can no longer guarantee uniqueness of the value, since the UID may - and probably was - generated hierarchically and dropping the extra period effectively drops one level of that hierarchy. The only entity that can properly "fix" the UIDs so as to maintain links and guarantee uniqueness is someone with knowledge of the algorithm and values that generated the UID.)
// Jasper
jasper.yeh
Senior Member
Senior Member
Posts:420
Avatar

--
2009-12-11 05:45 PM  

For the purposes of keeping the discussion in one place though, I'd like to ask for any responses to be posted to the other thread.


// Jasper
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2010 ClearCanvas Inc.