BUG when reading mha file with AnatomicalOrientation

After discussion with @thewtex and @aylward, we agreed that the current integration of MetaIO inside ITK is incorrect, namely:

  1. The reader ignores the anatomical orientation and assumes the data is always in LPS. It should instead adjust the orientation matrix described in the file to go from IJK to LPS if the anatomical orientation differs from LPS
  2. The writer uses the direction matrix to infer an anatomical orientation (somehow?). It should instead write LPS and the associated direction matrix in that space.

As a result:

  • We’ve agreed that this will need to be fixed in ITK.
  • VTK will properly use those fields when adding orientation support.
4 Likes