Hello,

I have pushed a topic with three commits to my github account:

https://github.com/blowekamp/ITK/commit/64b230bfa6f0d8c4b477704d3dd6033c27536e28
https://github.com/blowekamp/ITK/commit/f44e632683f787d3f566323a8dd5db6d4b76e619
https://github.com/blowekamp/ITK/commit/5c7281cfdc1888e907b85a86cbf779cc4f21cf27
 *

*I am not entirely comfortable with the changes to the parsing of header the 
header information and making the non-blank whitespace terminate the string 
fields. There is a potential for some serious side effects there. While all the 
ITK tests still pass as I was looking over the metaIO object tests they appear 
to be the type which just write the data out and then prints it to stdout, it 
does not verify that's it's correct. So that does not help to instill 
confidence in the correctness in the above change.


> 
> From: Stephen Aylward <[email protected]>
> Date: Wednesday, August 15, 2012 9:57 AM
> To: Bradley Lowekamp <[email protected]>
> Cc: ITK <[email protected]>
> Subject: Re: [Insight-developers] MetaIO Unknown meta-data bug
> 

...

> 
> Third - it is a bug we should fix.   My preference is to simply not
> write out a tag if there is no associated value.   Agreed?  

My initial commit did this in ITK. The second one does this in the metaIO 
library and additionally prints a warning.


>   Then, if
> a tag without a value is found, should it report an error, or just
> continue on?   I guess continue on, but not report that tag as set.
> Agreed?

I think it's more complicated and ambiguous. 

Well with the current parsing/grammar? it is ambiguous as to if the tag/field 
has an empty value, or if it's value is on the next line, which may be the next 
tag/field. I am using the term empty value to indicate a string of zero length 
as opposed to no value, which sounds more like a NULL pointer or something.

My third patch does not let the parse "eat" newline or other non-blank white 
spaces after the tag/field name. This may have other consequences, in the 
parsing, so I am not entirely comfortable with it. If the value is empty, we 
might as well just set the value to the empty string, if we are able to parse 
it.

The more I think about the more I think it may be best to not change the 
parsing, and just stop allowing the metaIO library to write ambiguous empty 
value for fields, which is accomplished in the first two patchs. Agree?

> 
> Thanks,
> Stephen
> 



========================================================
Bradley Lowekamp  
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine 
[email protected]



_______________________________________________
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://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://www.itk.org/mailman/listinfo/insight-developers

Reply via email to