[Dcmlib] failed to read some DICOM files

Jean-Pierre ROUX jean-pierre.roux at creatis.insa-lyon.fr
Sun May 8 19:02:24 CEST 2005


At 13:42 -0700 4/05/05, Dennis wrote:
Hi, Dennis.

Could you send us a sample of he images that causes troubles.
It would be very helpfull for us to fix the bug.
Thx.
Jean-Pierre

>Hi,
>
>I tried to use GDCM to read some DICOM files, but i can't read it 
>because gdcm::File::IsReadable is false.
>However I tried to read it with the other tools such as IrfanView, 
>it can be read correctly.
>From my debugging, I found something is suspicious :
>In gdcmDocument there is a judge statement in function 
>Document::FindDocEntryLength( DocEntry *entry ):
>
>if ( Filetype == ExplicitVR && !entry->IsImplicitVR() )
>
>For this DICOM file, Filetype is ACR, entry->IsImplicitVR() is true, 
>VR is "UI". so this "if" is false, and then goes to ReadInt32().
>ReadInt32() will return a big number that is not correct. Actually 
>it should read ReadInt16.
>From my point of view, if ( Filetype == ExplicitVR && 
>!entry->IsImplicitVR() ) is too strict. As i read from 
>Dicom2004_Part5, ps3.5-7.1.2
>, I think if entry is ExplicitVR and VR is UI, Value Length Field is 
>a 16-bit unsigned integer.
>I'm not sure if i'm correct because I don't know what is the 
>standard format for ACR.

Actually, constructors moved slowly from ACR-NEMA format to DICOM format.
In our data set, we've got a lot of images that are neither 'pure 
ACR-NEMA' nor 'pure DICOM', but a strange mixture between the two.

We used heuristics that allow gdcm to read all the images (but *yours*)
With a sample, we'll improve them, to allow gdcm to read your images, as well.
JP



>
>any hints will be helpful,
>
>Thx,
>
>Dennis
>
>_______________________________________________
>Dcmlib mailing list
>Dcmlib at creatis.insa-lyon.fr
>http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib

   Jean-Pierre ROUX
   UMR CNRS 5515-CREATIS
   Laboratoire de Radiologie Experimentale
   Hopital Cardiologique
   28 Avenue du Doyen LEPINE
   B.P. Lyon-Montchat
   69394 Lyon Cedex 03
 
   Tel      : (+33) 04 72 35 74 12
   Fax      : (+33) 04 72 68 49 16
   URL      : http://www.creatis.univ-lyon1.fr
   e-mail   : jpr at creatis.univ-lyon1.fr
								   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2399 bytes
Desc: not available
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20050508/d862f5b4/attachment.bin>


More information about the Dcmlib mailing list