Dwigradcheck nifti and mif file inconsistent gradient table

Hello @jdtournier ,
Hope you are doing great. I was performing dwigradcheck using the nifti file.

dwigradcheck nii4D.nii -fslgrad bvecs.txt bvals.txt

I got an error message.
`

dwigradcheck: [ERROR] Internal error (inconsistent gradient table storage)

`

Again, I performed dwigradcheck using mif file after using mrconvert.

mrconvert nii4D.nii -fslgrad bvecs.txt bvals.txt nii4D.mif
dwigradcheck nii4D.mif

It works.

Would you mind explaining to me why this is happening?

Many Thanks,
Suren

@bjeurissen, I think this one’s for you…?

Hi Suren

My best guess is that you have a transposed bvec table.

This format is specified as having three rows, one for each of the i, j, k components of the diffusion sensitisation direction, and one column per volume. In the C++ binaries, as of 3.0_RC1, bvec files that are erroneously transposed can nevertheless be imported. This is however not reflected in dwigradcheck, which is written in Python and does a straight numerical matrix data import. At my end I could modify dwigradcheck to provide the same support, but at your end I would be critical of whatever produced that file; there’s likely no problem, but whatever produced it is nevertheless non-conforming.

Rob

1 Like