Hi,
Thank you for your amazing library. I am impressed by the functionalities and the speed.
I am trying to understand what the affine transform is doing. I have a nii
file with following information:
shell> mrinfo -all fodf.nii
************************************************
Image name: "fodf.nii"
************************************************
Dimensions: 145 x 174 x 145 x 45
Voxel size: 1.25 x 1.25 x 1.25 x 1
Data strides: [ -1 2 3 4 ]
Format: NIfTI-1.1
Data type: 32 bit float (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: 1 0 0 -90
-0 1 0 -126
-0 0 1 -72
comments: FSL5.0
mrtrix_version: 3.0.4
NIBabel reports the following affine transform
array([[ -1.25, 0. , 0. , 90. ],
[ 0. , 1.25, 0. , -126. ],
[ 0. , 0. , 1.25, -72. ],
[ 0. , 0. , 0. , 1. ]])
From mrview, I can see the following:
voxel index: [85, 62, 64, 0]
position = [16.38, -48.68, 8.507]
Doing affine @ np.array([85, 62, 64, 1])
, I get:
array([-16.25, -48.5 , 8. , 1. ])
which looks quite similar to position
but there is a minus discrepancy in front of the x value.
How come mrtrix gives this sign?
Thank you a lot for your help,
Best regards