<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>It unfortunately appears that my patch broke windows on both the ITK and VTK dashboards.</div><div><br></div><div>The methods "isblank" does not appear to be portable on windows. From a man page:</div><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; "> <b style="font-weight: bold; "><span class="highlight" style="background-color: rgb(255, 204, 204); ">isblank</span></b>() conforms to POSIX.1-2001 and <span class="highlight" style="background-color: rgb(255, 204, 204); ">C99</span></span></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; "><span class="highlight" style="background-color: rgb(255, 204, 204); "><br></span></span></div><div>I have submitted a patch here:</div><div><br></div><div><a href="http://review.source.kitware.com/#/c/7155/">http://review.source.kitware.com/#/c/7155/</a></div><div><br></div><div>Brad</div><div><br><div><div>On Aug 22, 2012, at 4:41 PM, Williams, Norman K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I went ahead and committed Bradley's suggested changes and pushed them to<br>the SVN for MetaIO. I also addressed a long standing problem with the<br>library as a Standalone project: It wouldn't build all the way, because<br>the test programs weren't linking to the ZLIB, whether it was the ITK or<br>system ZLIB.<br><br>Bradley's right, the tests would detect if there was a complete failure in<br>parsing, and nothing else. And as far as I know, they don't test what<br>happens if you feed MetaIO garbage text or a binary file.<br><br>MetaIO is great for what it is, but the parser is ad hoc and it isn't easy<br>to follow what it's doing. Furthermore I don't think there's any formal<br>documentation of what language it recognizes; the only definition of<br>correctness for an input is if the library reads the file, doesn't crash,<br>and produces output that seems correct.<br><br>And actually all that tricksy fiddling about with spaces and tabs and<br>newlines could be replaced with a much more concise parser that uses C++<br>iostream to tokenize the input.<br><br>If grant funding becomes available to support my job line for a month I'd<br>be glad to give it a go, but for now it's a matter of "if no one can tell<br>it's broke, no reason to fix it."<br>--<br>Kent Williams <a href="mailto:norman-k-williams@uiowa.edu">norman-k-williams@uiowa.edu</a><br><br><br><br><br><br><br>On 8/15/12 3:29 PM, "Bradley Lowekamp" <<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>> wrote:<br><br><blockquote type="cite">Hello,<br></blockquote><blockquote type="cite">I have pushed a topic with three commits to my github account:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="https://github.com/blowekamp/ITK/commit/64b230bfa6f0d8c4b477704d3dd6033c27">https://github.com/blowekamp/ITK/commit/64b230bfa6f0d8c4b477704d3dd6033c27</a><br></blockquote><blockquote type="cite">536e28<br></blockquote><blockquote type="cite"><a href="https://github.com/blowekamp/ITK/commit/f44e632683f787d3f566323a8dd5db6d4b">https://github.com/blowekamp/ITK/commit/f44e632683f787d3f566323a8dd5db6d4b</a><br></blockquote><blockquote type="cite">76e619<br></blockquote><blockquote type="cite"><a href="https://github.com/blowekamp/ITK/commit/5c7281cfdc1888e907b85a86cbf779cc4f">https://github.com/blowekamp/ITK/commit/5c7281cfdc1888e907b85a86cbf779cc4f</a><br></blockquote><blockquote type="cite">21cf27 *<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">*I am not entirely comfortable with the changes to the parsing of header<br></blockquote><blockquote type="cite">the header information and making the non-blank whitespace terminate the<br></blockquote><blockquote type="cite">string fields. There is a potential for some serious side effects there.<br></blockquote><blockquote type="cite">While all the ITK tests still pass as I was looking over the metaIO<br></blockquote><blockquote type="cite">object tests they appear to be the type which just write the data out and<br></blockquote><blockquote type="cite">then prints it to stdout, it does not verify that's it's correct. So that<br></blockquote><blockquote type="cite">does not help to instill confidence in the correctness in the above<br></blockquote><blockquote type="cite">change.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">From: Stephen Aylward <<a href="mailto:stephen.aylward@kitware.com">stephen.aylward@kitware.com</a>><br></blockquote><blockquote type="cite">Date: Wednesday, August 15, 2012 9:57 AM<br></blockquote><blockquote type="cite">To: Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>><br></blockquote><blockquote type="cite">Cc: ITK <<a href="mailto:insight-developers@itk.org">insight-developers@itk.org</a>><br></blockquote><blockquote type="cite">Subject: Re: [Insight-developers] MetaIO Unknown meta-data bug<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Third - it is a bug we should fix. My preference is to simply not<br></blockquote><blockquote type="cite">write out a tag if there is no associated value. Agreed?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">My initial commit did this in ITK. The second one does this in the metaIO<br></blockquote><blockquote type="cite">library and additionally prints a warning.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Then, if<br></blockquote><blockquote type="cite">a tag without a value is found, should it report an error, or just<br></blockquote><blockquote type="cite">continue on? I guess continue on, but not report that tag as set.<br></blockquote><blockquote type="cite">Agreed?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I think it's more complicated and ambiguous.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Well with the current parsing/grammar? it is ambiguous as to if the<br></blockquote><blockquote type="cite">tag/field has an empty value, or if it's value is on the next line, which<br></blockquote><blockquote type="cite">may be the next tag/field. I am using the term empty value to indicate a<br></blockquote><blockquote type="cite">string of zero length as opposed to no value, which sounds more like a<br></blockquote><blockquote type="cite">NULL pointer or something.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">My third patch does not let the parse "eat" newline or other non-blank<br></blockquote><blockquote type="cite">white spaces after the tag/field name. This may have other consequences,<br></blockquote><blockquote type="cite">in the parsing, so I am not entirely comfortable with it. If the value is<br></blockquote><blockquote type="cite">empty, we might as well just set the value to the empty string, if we are<br></blockquote><blockquote type="cite">able to parse it.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The more I think about the more I think it may be best to not change the<br></blockquote><blockquote type="cite">parsing, and just stop allowing the metaIO library to write ambiguous<br></blockquote><blockquote type="cite">empty value for fields, which is accomplished in the first two patchs.<br></blockquote><blockquote type="cite">Agree?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite">Stephen<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">========================================================<br></blockquote><blockquote type="cite">Bradley Lowekamp<br></blockquote><blockquote type="cite">Medical Science and Computing for<br></blockquote><blockquote type="cite">Office of High Performance Computing and Communications<br></blockquote><blockquote type="cite">National Library of Medicine<br></blockquote><blockquote type="cite"><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br><br><br>________________________________<br>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.<br>________________________________<br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">========================================================</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Bradley Lowekamp<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Medical Science and Computing for</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Office of High Performance Computing and Communications</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">National Library of Medicine<span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p><br class="Apple-interchange-newline"></span></div></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>