[ITK] [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/community/attachments/20161024/bee17704/attachment-0001.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/community/attachments/20161024/bee17704/attachment-0001.png>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list