Hi,
I've recently been working with MONAI that optionally uses pynrrd to read .nrrd and has an error when handling the space direction.
The way the variable space direction is read by pynrrd (in the 3d case as a 3x3 matrix) makes it easy to misinterpret as the upper left 3x3 part of the affine matrix (this is what is done in MONAI).
However, the matrix loaded by pynrrd is the transpose of the upper left 3x3 part of the affine matrix.
Loading the space direction variable to a matrix might cause this confusion, an alternative would be to instead load it as a list of vectors.
Hi, I've recently been working with MONAI that optionally uses pynrrd to read .nrrd and has an error when handling the space direction. The way the variable space direction is read by pynrrd (in the 3d case as a 3x3 matrix) makes it easy to misinterpret as the upper left 3x3 part of the affine matrix (this is what is done in MONAI). However, the matrix loaded by pynrrd is the transpose of the upper left 3x3 part of the affine matrix.
Loading the space direction variable to a matrix might cause this confusion, an alternative would be to instead load it as a list of vectors.