[ITK-users] Reading a DICOM file in SimpleITK and ITK (spacing error)

Mustafa Arikan mustafa at inode.at
Mon Oct 24 06:02:00 EDT 2016


Dear all,

reading a DICOM file (.dcm) in SimpleITK leads to following problem:

> RuntimeError: Exception thrown in SimpleITK ReadImage: 
> c:\d\vs9-pkg\simpleitk-build\itk\modules\core\common\include\itkImageBase.hxx:192:
> itk::ERROR: Image(00000000163F8ED0): A spacing of 0 is not allowed: 
> Spacing is [0, 0, 1]

The code looks like this:

> import SimpleITK
>
> inputFileName = 
> "D:\\workspace\\exports\\51871876-25-ARTGGEANMAADQAAVSEGAJEAMD+BWSTZRRGTFTMNECYDQVUXOXNNVNTRZVWGHRLQ+TNXWEN\\bscan.dcm"
> reader = SimpleITK.ImageSeriesReader()
> image= SimpleITK.ReadImage(inputFileName)
> reader.SetFileName ( inputFileName )
> imageIn = reader.Execute()

And I am getting the same error within ITK.

But opening the .dcm file with some DICOM-Viewer works.


thanks in advance,
Mustafa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20161024/bee17704/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 23248 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20161024/bee17704/attachment.png>


More information about the Insight-users mailing list