<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; "><div><br></div><div>Having very small or very large spacing can have big impact on the numerical stability of derivatives and evolving differential equations such as level-sets or diffusion.</div><div><br></div><div>I think the least surprising thing to the users would be to just keep it the same as to avoid adverse numerical effects. Also this would not change the current behavior, correct?</div><div><br></div><div>Brad</div><br><div><div>On Dec 11, 2012, at 9:42 AM, Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><font><font face="verdana,sans-serif">PNG has three following units: meters, radians, and unknown. Currently PNG reader ignores unit, and writes unknown units.</font></font><div><font><font face="verdana,sans-serif"><br></font></font></div>

<div><font face="verdana, sans-serif">I guess I Should keep writing unknown units. But when reading PNG with meter units (eg. 2000 pixels/meter), should I transform it into pixel spacing 0.5 (assuming customary millimeter) or into 0.0005?</font></div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 11, 2012 at 3:36 PM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">No units. ITK considers units an application thing. You can add a unit<br>
type if the format supports it. It could help applications. For<br>
example, most medical images use mm's.<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Dec 11, 2012 at 8:25 AM, Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt; wrote:<br>
&gt; Is ITK still assuming no units, or millimeters are units for pixel spacing?<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Dec 10, 2012 at 5:25 PM, Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; If you submit a gerrit patch, I'll write or modify a test.<br>
&gt;&gt;<br>
&gt;&gt; How will we know if the fix works unless we test it? How will we know<br>
&gt;&gt; if someone reintroduces the bug if we don't test it?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Dec 10, 2012 at 10:41 AM, Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; But this would be a bug fix, not a patch introducing new features. This<br>
&gt;&gt; &gt; should already be working, and ideally having a test.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I know that many bugs don't get fixed, because they are not important<br>
&gt;&gt; &gt; enough<br>
&gt;&gt; &gt; and there is not enough people working on ITK. However a requirement to<br>
&gt;&gt; &gt; write a 20-30 line test for a few lines of fixed code is a great<br>
&gt;&gt; &gt; deterrence<br>
&gt;&gt; &gt; for me to contribute bug fixes (such as this one).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Mon, Dec 10, 2012 at 4:26 PM, Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Looks like ti should be fixed. But if you submit a gerrit patch, make<br>
&gt;&gt; &gt;&gt; sure oyu also supply a test or modify an existing test.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; The lack of a test is why your previous gerrit patch has not been<br>
&gt;&gt; &gt;&gt; approved.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Bill<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Mon, Dec 10, 2012 at 8:35 AM, Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt; Hi everyone,<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; I have noticed that ImageFileWriter, when writing png format, writes<br>
&gt;&gt; &gt;&gt; &gt; wrong<br>
&gt;&gt; &gt;&gt; &gt; pixel size information. It is not completely wrong, but it is not in<br>
&gt;&gt; &gt;&gt; &gt; accordance with png specification.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; When reading such files with OpenCV, I get following warning:<br>
&gt;&gt; &gt;&gt; &gt; libpng warning: Invalid sCAL ignored: invalid unit<br>
&gt;&gt; &gt;&gt; &gt; This is not just annoying and clutter-causing, but displaying it for<br>
&gt;&gt; &gt;&gt; &gt; every<br>
&gt;&gt; &gt;&gt; &gt; single image slows down my OpenCV processing.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; I used XnView to batch-edit the extracted slices and set some scaling<br>
&gt;&gt; &gt;&gt; &gt; which<br>
&gt;&gt; &gt;&gt; &gt; adheres to the specification to get rid of this warning.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Now the question: should I correct this bug, or submit a bug report?<br>
&gt;&gt; &gt;&gt; &gt; My<br>
&gt;&gt; &gt;&gt; &gt; last<br>
&gt;&gt; &gt;&gt; &gt; bug-fixing ended non-gloriously :(<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; _____________________________________<br>
&gt;&gt; &gt;&gt; &gt; Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt;&gt; &gt;&gt; &gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt;&gt; &gt;&gt; &gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt;&gt; &gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Unpaid intern in BillsBasement at noware dot com<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Unpaid intern in BillsBasement at noware dot com<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</div></div></blockquote></div><br></div>
_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote></div><br></body></html>