[Dcmlib] failed to read some DICOM files

Dennis hudr at hotmail.com
Wed May 4 22:42:22 CEST 2005


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.
 
any hints will be helpful,
 
Thx,
 
Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20050504/6b3f5ff0/attachment.html>


More information about the Dcmlib mailing list