Print

Print


Hi experts,

I'm using the latest nifticlib (http://niftilib.sourceforge.net/)
to load NIFTI files with my C application. However, I
noticed differences in the q-form matrix and derived
orientation compared with those from fslhd:

with fslhd I get 
...
...

qform_name     Scanner Anat
qform_code     1
qto_xyz:1      -0.873408  0.051653  0.014708  119.279884
qto_xyz:2      0.049023  0.860391  -0.207760  -111.342300
qto_xyz:3      0.019488  0.150616  1.181787  -21.342064
qto_xyz:4      0.000000  0.000000  0.000000  1.000000
qform_xorient  Right-to-Left
qform_yorient  Posterior-to-Anterior
qform_zorient  Inferior-to-Superior
...
...


with nifti_image_to_ascii in nifti_io.c I get
...
...
qform_code = '1'
qform_code_name = 'Scanner Anat'
qto_xyz_matrix1 = '-0.874264 0.025372 -0.034796 119.279884'
qto_xyz_matrix2 = '0.025372 -0.000368 -1.199495 -111.342300'
qto_xyz_matrix3 = '0.025372 0.874632 0.000505 -21.342064'
qto_xyz_matrix4 = '0.000000 0.000000 0.000000 1.000000'
...
...

qform_i_orientation = 'Right-to-Left'
qform_j_orientation = 'Inferior-to-Superior'
qform_k_orientation = 'Anterior-to-Posterior'

The information fslhd presents is correct, so I don't understand
why nifti_io.c gives me the wrong results. Any help is
appreciated.

Cheers,
Ed