MRtrix3 / mrtrix3

MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
http://www.mrtrix.org
Mozilla Public License 2.0
294 stars 180 forks source link

Inconsistent sform and qform information in nifti files #94

Closed kpannek closed 10 years ago

kpannek commented 10 years ago

Not sure if this is an MRtrix issue or FSL issue, but FSL is struggling with nii files converted using mrconvert, throwing an error "inconsistent sform and qform information in file". It worked fine with mrtrix-0.2.12.

$ mrconvert data.mif data.nii $ fslhd data.nii ERROR: Inconsistent left-right order stored in sform and qform in file data Using sform instead of qform values

filename data.nii

sizeof_hdr 348 data_type INT16 dim0 3 dim1 128 dim2 128 dim3 53 dim4 0 dim5 0 dim6 0 dim7 0 vox_units mm time_units s datatype 4 nbyper 2 bitpix 16 pixdim0 0.000000 pixdim1 1.750000 pixdim2 1.750000 pixdim3 2.000000 pixdim4 0.000000 pixdim5 0.000000 pixdim6 0.000000 pixdim7 0.000000 vox_offset 352 cal_max 0.0000 cal_min 0.0000 scl_slope 1.000000 scl_inter 0.000000 phase_dim 0 freq_dim 0 slice_dim 0 slice_name Unknown slice_code 0 slice_start 0 slice_end 0 slice_duration 0.000000 time_offset 0.000000 intent Unknown intent_code 0 intent_name
intent_p1 0.000000 intent_p2 0.000000 intent_p3 0.000000 qform_name Scanner Anat qform_code 1 qto_xyz:1 1.750000 -0.000000 0.000000 222.250000 qto_xyz:2 0.000000 1.750000 0.000000 0.000000 qto_xyz:3 0.000000 0.000000 2.000000 -0.000004 qto_xyz:4 0.000000 0.000000 0.000000 1.000000 qform_xorient Left-to-Right qform_yorient Posterior-to-Anterior qform_zorient Inferior-to-Superior sform_name Scanner Anat sform_code 1 sto_xyz:1 -1.750000 -0.000000 0.000000 222.250000 sto_xyz:2 -0.000000 1.750000 -0.000000 0.000000 sto_xyz:3 -0.000000 -0.000000 2.000000 -0.000004 sto_xyz:4 0.000000 0.000000 0.000000 1.000000 sform_xorient Right-to-Left sform_yorient Posterior-to-Anterior sform_zorient Inferior-to-Superior file_type NIFTI-1+ file_code 1 descrip
aux_file

jdtournier commented 10 years ago

OK, that's not cool. I'll look into ASAP.

kpannek commented 10 years ago

Thanks!

jdtournier commented 10 years ago

Just created pull request #95 - please check it out and let me know whether it does / doesn't work for you...

kpannek commented 10 years ago

Works! Thanks for fixing this so quickly!