Diffusion-tensor MRI measures how water molecules diffuse in every voxel. In fibrous white matter, water diffuses faster along the fiber axis than across it, so each voxel's diffusion is modelled as a 3×3 tensor whose largest eigenvector points along the local fiber direction — drawn here as an ellipsoid stretched along that axis.
Fractional anisotropy (FA):
FA = 0 → diffusion is a sphere (isotropic: CSF, mixed/crossing signal)
FA → 1 → diffusion is a needle (one dominant fiber direction)
This simulator's field is built from two synthetic bundles: a horizontal tract (like the corpus callosum) and two vertical tracts (like the corticospinal tracts). Where they overlap, a single-tensor voxel can only report one averaged direction and its FA collapses — the textbook "crossing-fiber problem" that motivates more advanced HARDI/CSD models in real scanners.
Deterministic tractography (FACT-style): starting at a seed voxel, a streamline steps a short distance along the local principal eigenvector, resamples the tensor at the new point, and repeats — flipping the eigenvector's sign when needed, since it has no inherent orientation. Tracking halts when FA drops below your threshold (leaving anisotropic tissue) or the direction turns sharper than your angle limit (an anatomically implausible kink).
- FA stop threshold — lower it and tracts push further into low-anisotropy/crossing regions (more false continuations); raise it and tracking stops early but stays conservative.
- Turning-angle limit — a tight limit rejects sharp bends; a loose one lets tracts "jump" across a crossing onto the wrong bundle.
- Click to seed — trace a single streamline from any voxel, exactly like placing a seed ROI in a clinical tractography workstation.
Real-world relevance: this pipeline underlies pre-surgical white-matter mapping (avoiding eloquent tracts during tumour resection), traumatic-brain-injury and stroke connectivity assessment, and research into disorders like schizophrenia and multiple sclerosis where tract integrity itself is the biomarker.