<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
</head>
<body style="word-wrap:break-word; color:rgb(0,0,0)">
<div>
<div>
<div style="font-family:Calibri,sans-serif; font-size:14px"><span class="Apple-style-span" style="font-size:15px; font-family:Calibri">Dženan,</span></div>
<div style="font-family:Calibri,sans-serif; font-size:14px"><span class="Apple-style-span" style="font-size:15px; font-family:Calibri"><br>
</span></div>
<div style="font-family:Calibri,sans-serif; font-size:14px"><span class="Apple-style-span" style="font-size:15px; font-family:Calibri">In other parts of ITK, the file format units are converted to mm. While this is not strictly enforced or adhered to, in most
cases converting to/from mm when writing/reading from disk seems to be the most sensible and most expected thing to do.</span></div>
<div><span class="Apple-style-span" style="font-size:15px"><br>
</span></div>
<div style="font-family:Calibri,sans-serif; font-size:14px"><span class="Apple-style-span" style="font-size:15px; font-family:Calibri">Hans</span></div>
<div style="font-family:Calibri,sans-serif; font-size:14px">
<div>
<div style="font-family:Consolas; font-size:medium">
<div style="font-family:Consolas,monospace; font-size:12px">=================================================================</div>
<div style="font-family:Consolas,monospace; font-size:12px">Hans J. Johnson, Ph.D.</div>
<div style="font-family:Consolas,monospace; font-size:12px">Assistant Professor, Department of Psychiatry</div>
<div style="font-family:Consolas,monospace; font-size:12px"><br>
</div>
<div style="font-family:Consolas,monospace; font-size:12px">Mailing Address:</div>
<div style="font-family:Consolas,monospace; font-size:12px">W274 GH Email: <a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a></div>
<div style="font-family:Consolas,monospace; font-size:12px">200 Hawkins Drive Phone: (319) 353 8587</div>
<div style="font-family:Consolas,monospace; font-size:12px">The University of Iowa</div>
<div style="font-family:Consolas,monospace; font-size:12px">Iowa City, IA 52242</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family:Calibri,sans-serif; font-size:14px"><br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-size:14px; font-family:Calibri,sans-serif">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; border-bottom:medium none; border-left:medium none; padding-bottom:0in; padding-left:0in; padding-right:0in; border-top:#b5c4df 1pt solid; border-right:medium none; padding-top:3pt">
<span style="font-weight:bold">From: </span>Dženan Zukić <<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Tuesday, December 11, 2012 8:42 AM<br>
<span style="font-weight:bold">To: </span>Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
<span style="font-weight:bold">Cc: </span>Insight-users <<a href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Insight-users] PNGwriter writes wrong scaling information<br>
</div>
<div><br>
</div>
<div>
<div><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">
<<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></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ć <<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>> wrote:<br>
> Is ITK still assuming no units, or millimeters are units for pixel spacing?<br>
><br>
><br>
> On Mon, Dec 10, 2012 at 5:25 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> If you submit a gerrit patch, I'll write or modify a test.<br>
>><br>
>> How will we know if the fix works unless we test it? How will we know<br>
>> if someone reintroduces the bug if we don't test it?<br>
>><br>
>><br>
>> On Mon, Dec 10, 2012 at 10:41 AM, Dženan Zukić <<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>> wrote:<br>
>> > But this would be a bug fix, not a patch introducing new features. This<br>
>> > should already be working, and ideally having a test.<br>
>> ><br>
>> > I know that many bugs don't get fixed, because they are not important<br>
>> > enough<br>
>> > and there is not enough people working on ITK. However a requirement to<br>
>> > write a 20-30 line test for a few lines of fixed code is a great<br>
>> > deterrence<br>
>> > for me to contribute bug fixes (such as this one).<br>
>> ><br>
>> ><br>
>> > On Mon, Dec 10, 2012 at 4:26 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Looks like ti should be fixed. But if you submit a gerrit patch, make<br>
>> >> sure oyu also supply a test or modify an existing test.<br>
>> >><br>
>> >> The lack of a test is why your previous gerrit patch has not been<br>
>> >> approved.<br>
>> >><br>
>> >> Bill<br>
>> >><br>
>> >> On Mon, Dec 10, 2012 at 8:35 AM, Dženan Zukić <<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > Hi everyone,<br>
>> >> ><br>
>> >> > I have noticed that ImageFileWriter, when writing png format, writes<br>
>> >> > wrong<br>
>> >> > pixel size information. It is not completely wrong, but it is not in<br>
>> >> > accordance with png specification.<br>
>> >> ><br>
>> >> > When reading such files with OpenCV, I get following warning:<br>
>> >> > libpng warning: Invalid sCAL ignored: invalid unit<br>
>> >> > This is not just annoying and clutter-causing, but displaying it for<br>
>> >> > every<br>
>> >> > single image slows down my OpenCV processing.<br>
>> >> ><br>
>> >> > I used XnView to batch-edit the extracted slices and set some scaling<br>
>> >> > which<br>
>> >> > adheres to the specification to get rid of this warning.<br>
>> >> ><br>
>> >> > Now the question: should I correct this bug, or submit a bug report?<br>
>> >> > My<br>
>> >> > last<br>
>> >> > bug-fixing ended non-gloriously :(<br>
>> >> ><br>
>> >> > _____________________________________<br>
>> >> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> >> ><br>
>> >> > Visit other Kitware open-source projects at<br>
>> >> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
>> >> ><br>
>> >> > Kitware offers ITK Training Courses, for more information visit:<br>
>> >> > <a href="http://www.kitware.com/products/protraining.php" target="_blank">
http://www.kitware.com/products/protraining.php</a><br>
>> >> ><br>
>> >> > Please keep messages on-topic and check the ITK FAQ at:<br>
>> >> > <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>> >> ><br>
>> >> > Follow this link to subscribe/unsubscribe:<br>
>> >> > <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">
http://www.itk.org/mailman/listinfo/insight-users</a><br>
>> >> ><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Unpaid intern in BillsBasement at noware dot com<br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Unpaid intern in BillsBasement at noware dot com<br>
><br>
><br>
<br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span><br>
<br>
<hr>
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any
retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
<hr>
</body>
</html>