Description
Hi,
The coordinate x and z are inverted in when we load minc 1 format
see the affine transformation it will make it clear
I notice that problem when I try to go from the voxel space to the world space using the following
This is the correct coordinates using the nii file :
nii_data = nib.load('/media/cdansereau/database1/data/template.nii.gz')
apply_affine(nii_data.get_affine(),[124,122,92])
[ 26. -12. 20.]
and the affine transformation
nii_data.get_affine()
[[ 1. 0. 0. -98.]
[ 0. 1. 0. -134.]
[ 0. 0. 1. -72.]
[ 0. 0. 0. 1.]]
This is the result with the same file in mnc1 format :
mnc_data = nib.load('/media/cdansereau/database1/data/template.mnc.gz')
apply_affine(mnc_data.get_affine(),[124,122,92])
[ -6. -12. 52.]
and the affine transformation
mnc_data.get_affine()
[[ 0. 0. 1. -98.]
[ 0. 1. 0. -134.]
[ 1. 0. 0. -72.]
[ 0. 0. 0. 1.]]