itk_fetch_module(MGHIO
  "MGHIO ImageIO plugin for ITK"
  GIT_REPOSITORY https://github.com/Slicer/itkMGHImageIO.git
  GIT_TAG dc1f16c73d497ca2d1d7e1c77096817f8a82eb21
  )

itk_fetch_module(MGHIO
  "MGHIO ImageIO plugin for ITK"
  GIT_REPOSITORY https://github.com/Slicer/itkMGHImageIO.git
  GIT_TAG 7d0386335dd90199fa7f1e79db7ceab22d8e957f
  )

Fix MGHIO to fix write failures
BUG: Fix MGHIO to fix write failures

MGHIO was not always writing valid images to disk. This problem was
identified as part of the BRAINSTools use of MGHIO, and resulted
in incorrect data results when using .mgz extension instead of
.nii.gz.  The problem was identified as incorrect direction cosine
manipulation between MGH coordinate space and ITK coordinate space.

In order to facilitate future maintenance, the code was modified
to use itk::Vector and itk::Matrix mathematical operations rather
than c-arrays with manual computations.  This change makes the
code easier to debug (using external matrix calculators) and easier
to validate to the documentation.

More extensive tests created to stress test reading and writing.

Test images converted to/from nifti format for reading and writing
and loaded into slicer to visually confirm that all information is
preserved.

Change-Id: I7a850e2aa6a1938c94326769c415380cf6ee68e8
