<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>I have a fix here for a bug I have encountered with the MetaImageIO:</div><div><br></div><div><a href="http://review.source.kitware.com/#/c/6998/">http://review.source.kitware.com/#/c/6998/</a></div><div><br></div><div><br></div><div>The question I have to the MetaImage folk, is if this is just a problem with the ITK ImageIO or does a fix in the MetaIO library need to be made. I took the path of least resistance and just fixed it in ITK's ImageIO. However, the fact that passing an empty string to the "AddUserField" method results in a meta image header file which can not be read back is concerning. I unfortunately I don't really care to dive into the metaio library unless needed.</div><div><br></div><div>The error from the test I wrote:</div><div><br></div><div><div>WARNING: In /nfs/Users/blowekamp/src/ITK-gerrit/Modules/IO/Meta/src/itkMetaImageIO.cxx, line 633</div><div>MetaImageIO (0x102005400): Unsupported metaData item AnUnsuportedComplexInitalized of type St7complexIfEfound, won't be written to image file</div><div><br></div><div>DimSize required and not defined.</div><div>MetaObject: Read: MET_Read Failed</div><div>MetaImage: M_Read: Error parsing file</div><div>MetaImage: Read: Cannot parse file</div><div>ITK test driver caught an ITK exception:</div><div><br></div><div>itk::ExceptionObject (0x100e00790)</div><div>Location: "unknown" </div><div>File: /nfs/Users/blowekamp/src/ITK-gerrit/Modules/IO/Meta/src/itkMetaImageIO.cxx</div><div>Line: 87</div><div>Description: itk::ERROR: MetaImageIO(0x102006800): File cannot be read: foo.mha for reading.</div><div>Reason: Unknown error: 0</div></div><div><br></div><div>The file header:</div><div><br></div><div><div>ObjectType = Image</div><div>NDims = 2</div><div>BinaryData = True</div><div>BinaryDataByteOrderMSB = False</div><div>CompressedData = False</div><div>TransformMatrix = 1 0 0 1</div><div>Offset = 0 0</div><div>CenterOfRotation = 0 0</div><div>ElementSpacing = 1 1</div><div>ASimpleFloatInitalized = 1.23456</div><div>AnUnsuportedComplexInitalized = </div><div>DimSize = 32 32</div><div>AnatomicalOrientation = ??</div><div>ElementType = MET_USHORT</div><div>ElementDataFile = LOCAL</div></div><div><br></div><div>Thanks for feedback,</div><div>Brad</div><div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><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"></div><br class="Apple-interchange-newline">
</div>
<br></div></body></html>