Hi there,
How is the rightmost column in `mri_convert -c` calculated?
I have the following fslhd (relevant fields shown only) in a NIFTI image:
``` dim1 208 dim2 300 dim3 320 qto_xyz:1 0.799690 0.022176 0.001352 -86.687996 qto_xyz:2 -0.021442 0.783122 -0.162051 -62.728546 qto_xyz:3 -0.005816 0.161952 0.783414 -174.620270 qto_xyz:4 0.000000 0.000000 0.000000 1.000000 ```
After `mri_convert -c`, mri_convert reports the following (relevant fields shown only) in the MGZ image:
``` voxel to ras transform: -1.0000 -0.0000 0.0000 128.0225 -0.0000 0.0000 1.0000 -101.4184 0.0000 -1.0000 -0.0000 102.4140 0.0000 0.0000 0.0000 1.0000 ```
Shouldn't the right-most column be: 128.5 -128.5 128.5 1 The numbers are (256+1)/2=128.5
Best, Tashrif
On 9/18/2020 12:12 PM, Billah, Tashrif wrote:
Hi there,
How is the rightmost column in `mri_convert -c` calculated?
I have the following fslhd (relevant fields shown only) in a NIFTI image:
dim1 208 dim2 300 dim3 320 qto_xyz:1 0.799690 0.022176 0.001352 -86.687996 qto_xyz:2 -0.021442 0.783122 -0.162051 -62.728546 qto_xyz:3 -0.005816 0.161952 0.783414 -174.620270 qto_xyz:4 0.000000 0.000000 0.000000 1.000000
That looks like it is the qform matrix in the nifti file
After `mri_convert -c`, mri_convert reports the following (relevant fields shown only) in the MGZ image:
voxel to ras transform: -1.0000 -0.0000 0.0000 128.0225 -0.0000 0.0000 1.0000 -101.4184 0.0000 -1.0000 -0.0000 102.4140 0.0000 0.0000 0.0000 1.0000Shouldn't the right-most column be:
128.5 -128.5 128.5 1The numbers are (256+1)/2=128.5
Not necessarily. That matrix still converts from col-row-slice to scanner RAS (or whaterver the qform space is)
Best, Tashrif
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu