[Insight-users] Problem in reading a clean DICOM file

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Oct 24 12:33:05 EDT 2006


pef magic wrote:
> Hello,
> 
> I am trying to open a DICOM file (joined with the mail), taking as 
> example, the file "examples/IO/DicomImageReadWrite.cxx".
> First, I have tried to open this file with other free software and they 
> seem to know it as a clean dicom file.
> Nevertheless, it doesn't work with itk and stops at the  "try 
> {reader->Update();}catch" test. The same code, with other dicoms I had, 
> works perfectly, of course.
> The dicom files (those which do not work) had been obtained by 
> converting a "Visible Woman" General Electric Genesis format into the 
> "dcm" format thanks to ezDicom.exe.
> Do you know what is the problem ?


I think I'll have to really support this one. No this is NOT a valid 
DICOM file. Your meta header specify that the dataset is encoded in Big 
Endian:

D 0002|0010 [UI] 
[Transfer Syntax UID] [1.2.840.10008.1.2.2 ]  ==>       [Explicit VR - 
Big Endian]


But your dataset was encoded in little endian. If you have a lot of 
those file, then you need to open them with an hex editor and change the 
string

1.2.840.10008.1.2.2 into 1.2.840.10008.1.2.1

Then try running ITK again on your file.

Mathieu
Ps: just for curiosity on how many free software, please quote them, did 
you try your image against.


More information about the Insight-users mailing list