Related Experiment Video
Updated: Jan 20, 2026

A MRI-Based Toolbox for Neurosurgical Planning in Nonhuman Primates
Published on: July 17, 2020
SpinDoctor: A MATLAB toolbox for diffusion MRI simulation
Jing-Rebecca Li1, Van-Dang Nguyen2, Try Nguyen Tran1
1INRIA Saclay, Equipe DEFI, CMAP, Ecole Polytechnique, Route de Saclay, 91128 Palaiseau Cedex, France.
Abstract:
The complex transverse water proton magnetization subject to diffusion-encoding magnetic field gradient pulses in a heterogeneous medium can be modeled by the multiple compartment Bloch-Torrey partial differential equation. Under the assumption of negligible water exchange between compartments, the time-dependent apparent diffusion coefficient can be directly computed from the solution of a diffusion equation subject to a time-dependent Neumann boundary condition. This paper describes a publicly available MATLAB toolbox called SpinDoctor that can be used 1) to solve the Bloch-Torrey partial differential equation in order to simulate the diffusion magnetic resonance imaging signal; 2) to solve a diffusion partial differential equation to obtain directly the apparent diffusion coefficient; 3) to compare the simulated apparent diffusion coefficient with a short-time approximation formula. The partial differential equations are solved by P1 finite elements combined with built-in MATLAB routines for solving ordinary differential equations. The finite element mesh generation is performed using an external package called Tetgen. SpinDoctor provides built-in options of including 1) spherical cells with a nucleus; 2) cylindrical cells with a myelin layer; 3) an extra-cellular space enclosed either a) in a box or b) in a tight wrapping around the cells; 4) deformation of canonical cells by bending and twisting; 5) permeable membranes; Built-in diffusion-encoding pulse sequences include the Pulsed Gradient Spin Echo and the Oscillating Gradient Spin Echo. We describe in detail how to use the SpinDoctor toolbox. We validate SpinDoctor simulations using reference signals computed by the Matrix Formalism method. We compare the accuracy and computational time of SpinDoctor simulations with Monte-Carlo simulations and show significant speed-up of SpinDoctor over Monte-Carlo simulations in complex geometries. We also illustrate several extensions of SpinDoctor functionalities, including the incorporation of T2 relaxation, the simulation of non-standard diffusion-encoding sequences, as well as the use of externally generated geometrical meshes.
More Related Videos
Related Concept Videos
08:41A MRI-Based Toolbox for Neurosurgical Planning in Nonhuman Primates
09:53Role of Diffusion MRI Tractography in Endoscopic Endonasal Skull Base Surgery
09:17Structure-Based Simulation and Sampling of Transcription Factor Protein Movements along DNA from Atomic-Scale Stepping to Coarse-Grained Diffusion
10:33A Method for Determination and Simulation of Permeability and Diffusion in a 3D Tissue Model in a Membrane Insert System for Multi-well Plates
10:46Diffusion Imaging in the Rat Cervical Spinal Cord
07:34Functional MRI in Conjunction with a Novel MRI-compatible Hand-induced Robotic Device to Evaluate Rehabilitation of Individuals Recovering from Hand Grip Deficits

