GradLint: a fast, open-source Rust tool for b-vector flip detection, gradient-scheme QC, and auto-repair in diffusion MRI
Related Experiment Video
Updated: Oct 30, 2026

Diffusion Tensor Magnetic Resonance Imaging in the Analysis of Neurodegenerative Diseases
Published on: July 28, 2013
Marco Tagliaferri1, Luigi Cattaneo2
1(Un)iversity of Trento - Center for Mind/Brain Sciences.
Background:
Diffusion MRI (dMRI) infers white-matter tracts using stored gradient tables. If a table is flipped or permuted relative to the image coordinates during conversion or transfer, downstream tractography is silently corrupted.
New Method:
GradLint is a fast, open-source tool that detects gradient flips, audits acquisition schemes, and repairs corrupted tables. It evaluates all 48 signed-permutation candidate conventions from a single DTI fit using an analytic matrix transformation, ranking them with an anatomy-anchored, directional-stepping fiber-coherence index.
Results:
On 1106 corrupted cases (HCP, single-site, and clinical datasets), GradLint ranked the correct convention first in every case and retained antipode-aware agreement with the field reference dwigradcheck. At the default 2% relative-margin threshold, --apply-repair yielded 1022 correct FLAG repairs; 84 L5 WARN cases required additional --force-repair authorization. Without authorization, corrections were withheld. It successfully resolved acquisition obliquity in voxel space. The frame-aware writer verified correctness on 190 subjects. With eight threads per tool, the median within-subject speed-up was 12.90-23.25× across the three timing groups; with automatic/default threading it was 5.27-8.91×. GradLint's eight-thread median check times were 2.85-14.07s.
Comparison With Existing Methods:
Unlike tools that repeat expensive tracking or DTI fitting for every candidate, GradLint obtains all candidate eigenvector fields analytically from one fit. It integrates a scheme quality-control audit, outputs machine-readable provenance, returns exit codes for CI/CD integration, and generates optional DTI principal-direction glyph figures.
Conclusions:
GradLint is a fast, open-source Rust tool that acts as a quality-control gate, guarding dMRI preprocessing pipelines against silent orientation errors.
Related Concept Videos
Gradient Vectors and Their Applications
Significance of the Gradient Vector
Gradient Fields
Magnetic Resonance Imaging
