[WARNING] voxel spacings inconsistent between NIFTI s-form and header field pixdim AFTER dcm2niix

Dear mrtrix team,

I used dcm2bids to convert a dwi dicom to nifti and after using mrinfo, I received the following warning:

[WARNING] voxel spacings inconsistent between NIFTI s-form and header field pixdim

I am aware from reading other posts on this forum that this can occur after affine transforms, but I have not seen this occur after a conversion only. My questions is will this affect future analysis if I then perform transforms using this file- e.g. to register same-subject T1 to the DWI or to register the DWI to same-subj T1 from a different time-point to the DWI (for ACT tractography).

For reference, the outputs of:

mrinfo:

 Dimensions:        256 x 256 x 50 x 65
  Voxel size:        0.9375 x 0.9375 x 2.99995 x 8
  Data strides:      [ -1 2 3 4 ]
  Format:            NIfTI-1.1 (GZip compressed)
  Data type:         signed 16 bit integer (little endian)
  Intensity scaling: offset = 0, multiplier = 1
  Transform:               0.9995    -0.01374     0.02863      -126.6
                          0.01366      0.9999    0.003038      -81.68
                         -0.02866   -0.002645      0.9996      -58.01
  comments:          TE=83;Time=93630.000

mrinfo -transform

    0.99949576013031   -0.013741500192248    0.028625050282083    -126.569877326489
  0.0136601974502616    0.999902081695435  0.00303796248553624     -81.677750329487
 -0.0286639928683114 -0.00264540991193068    0.999585602777613    -58.0140989795327
                   0                    0                    0                    1

fslhd:

sizeof_hdr 348

data_type INT16

dim0 4

dim1 256

dim2 256

dim3 50

dim4 65

dim5 1

dim6 1

dim7 1

vox_units mm

time_units s

datatype 4

nbyper 2

bitpix 16

pixdim0 -1.000000

pixdim1 0.937500

pixdim2 0.937500

pixdim3 3.000000

pixdim4 8.000000

pixdim5 0.000000

pixdim6 0.000000

pixdim7 0.000000

vox_offset 352

cal_max 0.000000

cal_min 0.000000

scl_slope 1.000000

scl_inter 0.000000

phase_dim 2

freq_dim 1

slice_dim 3

slice_name Unknown

slice_code 0

slice_start 0

slice_end 0

slice_duration 0.000000

toffset 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 -0.937027 -0.012883 0.085875 112.372078

qto_xyz:2 -0.012806 0.937408 0.009114 -78.412109

qto_xyz:3 0.026872 -0.002480 2.998757 -64.866585

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

sform_name Scanner Anat

sform_code 1

sto_xyz:1 -0.937027 -0.012883 0.085874 112.372078

sto_xyz:2 -0.012806 0.937408 0.009114 -78.412109

sto_xyz:3 0.026872 -0.002480 2.998703 -64.866585

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 TE=83;Time=93630.000

Thanks!

Yizhou

1 Like

This warning occurs because there are two sources of information that encode the voxel size in a NIfTI image: the pixdim field, and the sform (specifically the norm of each of the first 3 columns of the sform). We check for consistency between these two bits of information, within a tolerance of 1e-5 (if the sform is defined). In case of mismatch, we rely on the information from the sform. You can see from your output that the voxel size determined from the sform is 2.99995 (as reported by mrinfo), whereas the pixdim entry is set to 3 (from the fslhd output). I assume that’s just enough to trigger the warning.

So I don’t think this will have any impact down the track – unless you need the voxel size to be correct within 6 decimal places… But we could also relax that tolerance a bit if it’s felt to be too strict?

Thanks for the explanation!