[Dcmlib] failed to read some DICOM files

Mathieu Malaterre mathieu.malaterre at kitware.com
Fri May 6 15:46:51 CEST 2005


Dennis,

	No your email is not discarded but I guess most of the dev are away for 
some reason. I'll keep your email in mind and will forward it our DICOM 
guru (Jean Pierre Roux) when he is back. Meanhile could you send us a 
copy of this DICOM file this would be a great addition to our Baseline 
images.

Thanks
Mathieu

Dennis wrote:
> 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
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Dcmlib mailing list
> Dcmlib at creatis.insa-lyon.fr
> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib




More information about the Dcmlib mailing list