Does dwigradcheck provide clues on how to change the header info, and how to do that?

Here is the result of the dwigradcheck of the merged AP PA image using dwifslpreproc and it’s resulting bvec/bval. PS: The tensor fitting looks bad for this.

As I understood, none 0,1,2 should be first to indicate a match between the file and the bvec?

If so how should I change my bvec table to fit the .nii file?

Mean length Axis flipped Axis permutations Axis basis
33.95 1 (0, 1, 2) image
33.46 1 (0, 1, 2) scanner
15.51 2 (0, 2, 1) scanner
15.46 1 (1, 0, 2) image
15.42 0 (1, 0, 2) scanner
15.36 1 (0, 2, 1) image
15.10 1 (0, 2, 1) scanner
14.95 2 (0, 2, 1) image
14.83 1 (2, 1, 0) scanner
14.81 1 (1, 0, 2) scanner
14.80 none (2, 1, 0) scanner
14.79 1 (2, 1, 0) image
14.75 none (2, 1, 0) image
14.66 0 (1, 0, 2) image
14.52 0 (0, 1, 2) image
14.31 0 (0, 1, 2) scanner
14.11 2 (0, 1, 2) scanner
13.93 2 (0, 1, 2) image
13.47 none (0, 1, 2) scanner
13.45 none (0, 2, 1) image
13.35 0 (0, 2, 1) scanner
13.34 0 (2, 0, 1) scanner
13.34 none (0, 1, 2) image

1 Like

Indeed.

If you use dwigradcheck with one of the the -export_grad_* options, you can have it output the corrected gradient directions, e.g.:

dwigradcheck dwi.nii -fslgrad bvecs bvals -export_grad_fsl bvecs_corrected bvals_corrected

(make sure to now use the corrected bvecs and bvals for all subsequent commands that require gradient directions) or much simpler using .mif:

dwigradcheck dwi.mif -export_grad_mrtrix grad.txt
mrconvert dwi.mif -grad grad.txt dwi_corrected.mif
1 Like