<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hello,
<div class=""><br class="">
</div>
<div class="">ITK is a physical space aware image processing toolkit. It take into consideration the location, origin and SPACING when doing operations. Since an image with zero spacing has no physical size, ITK refuses to process it. From the physical perspective
 your image has no extent and does not exist. ITK can not process such data. Other toolkit are not physical space aware and just process pixels.</div>
<div class=""><br class="">
</div>
<div class="">Please review the history of the file, and see where this error was introduced.</div>
<div class=""><br class="">
</div>
<div class="">HTH,</div>
<div class="">Brad</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Oct 27, 2016, at 6:48 AM, Mustafa Arikan <<a href="mailto:mustafa@inode.at" class="">mustafa@inode.at</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div bgcolor="#FFFFFF" text="#000000" class="">
<div class="moz-cite-prefix">Hi Dženan,<br class="">
<br class="">
this is not the problem because the spacing is not 0. And other frameworks like ImageJ can<br class="">
read the .dcm image and save it as a .mhd image.<br class="">
<br class="">
best regards,<br class="">
Mustafa<br class="">
<br class="">
Am 10/24/2016 um 5:01 PM schrieb Dženan Zukić:<br class="">
</div>
<blockquote cite="mid:CAPf2UMShOEXkZ1hRWrU6icUaoM+g+QPj5K5_A_tJdQKOqHfe-g@mail.gmail.com" type="cite" class="">
<div dir="ltr" class="">
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Hi Mustafa,</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
<br class="">
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
since the offending .dcm is in folder "exports", I assume some tool's DICOM export is broken. Spacing should never be 0. If spacing is not known, it should be set to 1. ITK has a right to complain about this. Can you re-export this file, and perhaps fiddle
 with export settings a bit?</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
<br class="">
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Regards,</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Dženan</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Mon, Oct 24, 2016 at 6:02 AM, Mustafa Arikan <span dir="ltr" class="">
<<a moz-do-not-send="true" href="mailto:mustafa@inode.at" target="_blank" class="">mustafa@inode.at</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000" class="">
<p class="">Dear all,</p>
<p class="">reading a DICOM file (.dcm) in SimpleITK leads to following problem:</p>
<div class=""><br class="webkit-block-placeholder">
</div>
<blockquote type="cite" class="">RuntimeError: Exception thrown in SimpleITK ReadImage: c:\d\vs9-pkg\simpleitk-build\<wbr class="">itk\modules\core\common\<wbr class="">include\itkImageBase.hxx:192:<br class="">
itk::ERROR: Image(00000000163F8ED0): A spacing of 0 is not allowed: Spacing is [0, 0, 1]</blockquote>
<span id="cid:part2.9F873CC4.9FDFB843@inode.at"><Mail Attachment.png></span>
<p class="">The code looks like this:</p>
<div class=""><br class="webkit-block-placeholder">
</div>
<blockquote type="cite" class="">import SimpleITK<br class="">
<br class="">
inputFileName = "D:<a href="smb://workspace//exports//" class="">\\workspace\\exports\\</a><wbr class="">51871876-25-<wbr class="">ARTGGEANMAADQAAVSEGAJEAMD+<wbr class="">BWSTZRRGTFTMNECYDQVUXOXNNVNTRZ<wbr class="">VWGHRLQ+TNXWEN\\bscan.dcm"<br class="">
reader = SimpleITK.ImageSeriesReader()<br class="">
image= SimpleITK.ReadImage(<wbr class="">inputFileName)<br class="">
reader.SetFileName ( inputFileName )<br class="">
imageIn = reader.Execute()</blockquote>
<p class="">And I am getting the same error within ITK.</p>
<p class="">But opening the .dcm file with some DICOM-Viewer works.</p>
<p class=""><br class="">
</p>
<p class="">thanks in advance,<br class="">
Mustafa<br class="">
</p>
</div>
<br class="">
______________________________<wbr class="">_______<br class="">
Powered by <a moz-do-not-send="true" href="http://www.kitware.com/" rel="noreferrer" target="_blank" class="">
www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at<br class="">
<a moz-do-not-send="true" href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank" class="">http://www.kitware.com/<wbr class="">opensource/opensource.html</a><br class="">
<br class="">
Kitware offers ITK Training Courses, for more information visit:<br class="">
<a moz-do-not-send="true" href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank" class="">http://www.kitware.com/<wbr class="">products/protraining.php</a><br class="">
<br class="">
Please keep messages on-topic and check the ITK FAQ at:<br class="">
<a moz-do-not-send="true" href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank" class="">http://www.itk.org/Wiki/ITK_<wbr class="">FAQ</a><br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
<a moz-do-not-send="true" href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank" class="">http://public.kitware.com/<wbr class="">mailman/listinfo/insight-users</a><br class="">
<br class="">
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<p class=""><br class="">
</p>
</div>
_____________________________________<br class="">
Powered by <a href="http://www.kitware.com" class="">www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at<br class="">
<a href="http://www.kitware.com/opensource/opensource.html" class="">http://www.kitware.com/opensource/opensource.html</a><br class="">
<br class="">
Kitware offers ITK Training Courses, for more information visit:<br class="">
http://www.kitware.com/products/protraining.php<br class="">
<br class="">
Please keep messages on-topic and check the ITK FAQ at:<br class="">
http://www.itk.org/Wiki/ITK_FAQ<br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
http://public.kitware.com/mailman/listinfo/insight-users<br class="">
_______________________________________________<br class="">
Community mailing list<br class="">
Community@itk.org<br class="">
http://public.kitware.com/mailman/listinfo/community<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>