GE - DICOMDIR and invalid study instance uid

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Roadrunner
Posts: 56
Joined: Mon, 2010-06-14, 16:41

GE - DICOMDIR and invalid study instance uid

#1 Post by Roadrunner »

Hey,
maybe some could give me a good hint - I have lots of DICOMDIR CDs from a hospital which creates (in my eyes ) invalid DICOMDIR files.
First there is the tag 0008,0005 (character encoding ) missing but DMCTK is reading the file - not with dcm2xml but in c++ - thanks. ;-)

Second there are missing study instance uid or example like this "9275655" which looks more an accession number but not that what I'm looking for.

Code: Select all

if (StudyRecord->findAndGetOFString(DCM_StudyInstanceUID , studyInstanceUID, 0, true).bad() ) ... 

reports me everything is okay even the string length is 0.

So my question is, is there a way for checking the given study instance uid from findAndGetOFString(DCM_StudyInstanceUID , studyInstanceUID, 0, true)...
is valid or not?
My solution would be if the given value is invalid I would open the first given file of the study record and read the study instance uid from the file.
But I don't want do this in general because we have the DICOMDIR which has to have the uid and the performance of reading in more files
would be even slower.

Thanks for any hint. :-)

Frank

J. Riesmeier
DCMTK Developer
Posts: 2503
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: GE - DICOMDIR and invalid study instance uid

#2 Post by J. Riesmeier »

Yes, there is a VR checker in dcmdata. For example, I would retrieve the DcmElement instance of the StudyInstanceUID using findAndGetElement() and then call checkValue() on the element (if it is non-empty). In addition, you might also want to check the prefix of the element value, because any other prefix than "0.", "1." or "2." would be dubious (see e.g. http://www.alvestrand.no/objectid/top.html).

Roadrunner
Posts: 56
Joined: Mon, 2010-06-14, 16:41

Re: GE - DICOMDIR and invalid study instance uid

#3 Post by Roadrunner »

Thank you very mutch.

It's working. :-)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 1 guest