Hello,

I have a fix here for a bug I have encountered with the MetaImageIO:

http://review.source.kitware.com/#/c/6998/


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.

The error from the test I wrote:

WARNING: In 
/nfs/Users/blowekamp/src/ITK-gerrit/Modules/IO/Meta/src/itkMetaImageIO.cxx, 
line 633
MetaImageIO (0x102005400): Unsupported metaData item 
AnUnsuportedComplexInitalized of type St7complexIfEfound, won't be written to 
image file

DimSize required and not defined.
MetaObject: Read: MET_Read Failed
MetaImage: M_Read: Error parsing file
MetaImage: Read: Cannot parse file
ITK test driver caught an ITK exception:

itk::ExceptionObject (0x100e00790)
Location: "unknown" 
File: /nfs/Users/blowekamp/src/ITK-gerrit/Modules/IO/Meta/src/itkMetaImageIO.cxx
Line: 87
Description: itk::ERROR: MetaImageIO(0x102006800): File cannot be read: foo.mha 
for reading.
Reason: Unknown error: 0

The file header:

ObjectType = Image
NDims = 2
BinaryData = True
BinaryDataByteOrderMSB = False
CompressedData = False
TransformMatrix = 1 0 0 1
Offset = 0 0
CenterOfRotation = 0 0
ElementSpacing = 1 1
ASimpleFloatInitalized = 1.23456
AnUnsuportedComplexInitalized = 
DimSize = 32 32
AnatomicalOrientation = ??
ElementType = MET_USHORT
ElementDataFile = LOCAL

Thanks for feedback,
Brad

========================================================
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