[Dcmlib] Reading DICOMDIR and FILEDIR

Tom Marynowski lordglub at gmail.com
Sun Aug 30 16:56:53 CEST 2009


Hello,

Sorry for the cross posting. Response could by in french or in english as
you want.
i use gdcm-1.3.2

if i read a dicom file witch include  all item STUDY SERIES IMAGE.
the following code work perfectly:
==================================
   fw = GDCM_NAME_SPACE::DicomDir::New();
     fw->SetFileName ( fileName );
     fw->Load( );

     // Test if the DicomDir is readable
     if( !fw->IsReadable() )
     {
         std::cout<<"[DCMRDIR]          DicomDir '"<<fileName
         <<"' is not readable ...Failled"<<std::endl;
     }
 ================================


But if the DICOMDIR include only STUDY directory record type and refer
to DIRFILE for SERIES using referenced file ID for series information
and again for IMAGES information like:

DICOMDIR
Study1-------DIRFILE
                Series1----------DIRFILE
                                     Image1
                                     Image2
                                     Image3
                Series2----------DIRFILE
                                     Image1
                                     Image2
                                     Image3
Study2-------DIRFILE
                Series1----------DIRFILE
                                     Image1
                                     Image2
                                     Image3


With the same code i obtained the following error for each


Error: In /home/thomas/ExternalLibraries/gdcm-1.3.2/src/gdcmDicomDir.cxx,
line 754, function void gdcm::DicomDir::CreateDicomDir()
Add AddStudyToEnd failed

Any one have an idea ?
I have read nema part3.10 and i have see only example and descritpion for a
single DICOMDIR file. Never see some think about complience of this
structure of files (DICOMDIR or DIRFILE). So this sturucture is compliance
or not ?

I can joint DICOMDIR and DIRFILE if required

Thank!
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20090830/0695f6fd/attachment.html>


More information about the Dcmlib mailing list