-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MHA created from DM3 with SCIFIO not readable due to header #57
Comments
Not sure if this is a SCIFIO issue or if it should go to https://github.com/Kitware/MetaIO? |
It might need to go into https://github.com/Kitware/MetaIO. Does read .dm3, write .mha, read .mha create the problem? Or are there additional ingredients necessary? |
Thanks @dzenanz for taking a look
Yes, in romangrothausmann/ITK-CLIs@4fa8431 it was a mere conversion from DM3 to MHA (https://github.com/romangrothausmann/ITK-CLIs/blob/412a55c708056f28fd6cf7132067d05aafae171d/file_converter.cxx) and then reading the MHA again for getting the stats (https://github.com/romangrothausmann/ITK-CLIs/blob/412a55c708056f28fd6cf7132067d05aafae171d/stat.cxx). |
If any of the metadata fields contain a line break, that will be a problem. Some other stuff might be offensive too, I am not sure which. |
Well, I guess the question is whether SCIFIO creates some inappropriate headers from this DM3 or whether MetaIO has problems with some headers that are acceptable. |
scifio/scifio-imageio#57 stat output.mha DimSize required and not defined. MetaObject: Read: MET_Read Failed MetaImage: M_Read: Error parsing file MetaImage: Read: Cannot parse file /opt/ITK-CLIs/bin/stat: exception caught ! itk::ExceptionObject (0x55abf10e44d0) Location: "unknown" File: /opt/compilation/ITK-git/Modules/IO/Meta/src/itkMetaImageIO.cxx Line: 94 Description: itk::ERROR: MetaImageIO(0x55abf10e2960): File cannot be read: output.mha for reading. Reason: No such file or directory
I stumbled over the problem (romangrothausmann/ITK-CLIs@4fa8431) that an MHA created from a DM3 with SCIFIO was not readable by ITK again. It seems that is due to the very long/verbose header possibly containing some info that ITK's metaIO cannot cope with. The test DM3 can be found here:
https://github.com/romangrothausmann/ITK-CLIs/blob/4fa84310e05451aaf94322d0f93f554d21d905a8/tests/data/test.dm3
The text was updated successfully, but these errors were encountered: