🍃 Welcome to Week 23 of our Diffusion MRI Zero To Hero series! Once you’ve obtained a tractogram using any of the tracking algorithms, it would probably be noisy. Without post-processing, 30-40% of those streamlines may be anatomically implausible. Hence, cleaning the tractogram is an important task. 🔧 The Post-Processing Pipeline 🔹 Length Filtering: Remove spurious streamlines shorter than ~20 mm (this is mostly noise) and longer than ~300 mm (runaway errors). A healthy distribution peaks around 60-80 mm. 🔹 ROI-Based Virtual Dissection: Place virtual regions of interest in known anatomical locations. Keep only streamlines passing through "include" ROIs, discard any entering "exclude" zones. This is how you isolate specific bundles from a whole-brain tractogram. 🔹 Clustering / Bundle segmentation: Automatically group streamlines by geometric similarity. QuickBundles (fast distance-based), RecoBundles (atlas-guided), and TractSeg (deep learning) each offer different approaches. 🔹 Compression: Many points along a streamline are redundant. Compression removes them, cutting file size 50-90% with negligible shape loss. Essential when working with millions of streamlines. 🔍 Visual Quality Control Overlay streamlines on T1 or FA map and check: 🟢 Corpus callosum bridging hemispheres, corticospinal tract reaching brainstem, symmetric coverage, streamlines confined to white matter. 🔴 Red flags: streamlines in ventricles/CSF, looping artifacts, hemispheric asymmetry, bundles stopping abruptly in white matter. 📊 Quantitative QC 🔹 Streamline count: Whole-brain should be 100K-10M. Far fewer means poor coverage. 🔹 Length distribution: A spike at minimum length means streamlines are terminating early, check your masks or model. 🔹 Coverage map: Count streamlines per voxel across white matter. Dark patches reveal regions the tracker could not reach. 🔹 Mean FA along streamlines: If this drops below ~0.3, you may be tracking through gray matter or CSF. ❇️ The Bottom Line 🔹 When QC check fails, go upstream, ensure preprocessing and modeling stages and performed correctly. 🔹QC allows you to catch problems BEFORE they contaminate downstream analysis; if you spent 2 hours on tractography, spend at least 30 minutes on QC. ♻️ If this was helpful, please like, share, or comment! Question for the comments: what's the worst tractography artifact you've encountered? #DIPY #dMRIZeroToHero #DiffusionMRI #Neuroimaging #Tractography #BrainMapping #MedicalImaging #Neuroscience #Python
Diffusion Imaging in Python
Software Development
Bloomington, Indiana 1,473 followers
A Python package for analyzing diffusion MRI data.
About us
DIPY is a free and open source software project for computational neuroanatomy, focusing mainly on diffusion magnetic resonance imaging (dMRI) analysis. It implements a broad range of algorithms for denoising, registration, reconstruction, tracking, clustering, visualization, and statistical analysis of MRI data.
- Website
-
https://dipy.org
External link for Diffusion Imaging in Python
- Industry
- Software Development
- Company size
- 11-50 employees
- Headquarters
- Bloomington, Indiana
- Type
- Nonprofit
- Founded
- 2010
- Specialties
- Diffusion MRI, Medical Imaging, Tractography, Image Processing, Machine Learning, Neuroimaging, Neuroanatomy, Python, Signal Processing, and Data Science
Locations
-
Primary
Get directions
Luddy Hall 700 N Woodlawn
Bloomington, Indiana 47408, US
Employees at Diffusion Imaging in Python
Updates
-
🍃 Welcome to Week 22 of our Diffusion MRI Zero To Hero series! Last week, we followed a strict path along the sharpest peaks in deterministic tractography. But what if we stop assuming the exact fiber direction in every voxel? That's where Probabilistic Tracking comes in. ❔ What is the Probabilistic approach? 🔹 In deterministic tracking, the peak direction is treated as ground truth. Probabilistic tracking assumes our estimated orientation is uncertain, and that uncertainty carries real information. 🔹 Instead of always following the sharpest peak, it draws a direction from the full orientation distribution at each step. Directions near the peak are sampled more often, but off-peak directions get sampled too. 🔹 Run this thousands of times from the same seed and the streamlines fan out into a distribution. Unlike deterministic tracking, every run from the same seed can yield a different trajectory. 🔹That variability is the point, the frequency with which a path is traced becomes a measure of connection probability. 🔍 How It Works The setup is the same as last week, but the direction getter now works differently: 1️⃣ ODF as Input: Instead of reducing the fODF to a single peak, it uses the full distribution at each voxel to sample directions. 2️⃣ Repeated Sampling: Thousands of streamlines are launched from each seed. Because every step draws independently, trajectories diverge wherever the orientation is broad or multimodal. 3️⃣ Building a Connectivity Map: Each voxel records the number of streamlines that pass through it producing a spatial map of connection probability rather than a single deterministic pathway. 🎯 Strengths & Limitations 🔹 Crossings & Ambiguity: Where fibers overlap, deterministic tracking commits to one peak. Probabilistic tracking samples from the full distribution across iterations, allowing both pathways to be represented. 🔹 Sensitivity: Because sampling occasionally follows lower-probability directions, the algorithm can trace connections through regions of partial volume, high curvature, or low anisotropy areas where deterministic methods typically fail. 🔹 Trade-offs: Generating thousands of streamlines per seed comes at a high computational cost. The broader exploration also produces some anatomically implausible paths, making threshold selection on the connectivity map both consequential and non-trivial. ❇️ The Big Picture 🔹 Probabilistic tractography shifts us from "here is the path" to "here is how likely this path is." In practice, many studies use both: deterministic for major bundles, and probabilistic for less certain or more complex connectivity. ♻️ If this was helpful, please like, share, or comment so others can follow the series! Until then: have you run into cases where deterministic and probabilistic results disagreed, and which did you trust? #DIPY #dMRIZeroToHero #DiffusionMRI #Neuroimaging #Tractography #BrainMapping #MedicalImaging #Neuroscience #Python
-
-
🍃 Welcome to Week 21 of our Diffusion MRI Zero To Hero series! Last week, we zoomed out to introduce tractography. Today, we are grabbing our compass and following the strictest rules of navigation. Let’s dive into Deterministic Tractography. ❔ What is the Deterministic approach? 🔹 In deterministic tractography, we assume the principal fiber orientation from our local model (like the primary eigenvector in DTI or the sharpest peak in an fODF) is the absolute truth. 🔹 At every step, the algorithm queries this direction and moves perfectly aligned with it. There is no randomness or "maybe". It is a direct, predictable path. Run it ten times from the exact same spot, and you get the exact same streamline ten times. 🔍 The Three Essential Ingredients To build a deterministic streamline (often via integration algorithms like EuDX in Python), we need three core components: 1️⃣ The Seeds (Where do we start?): We initiate tracking in known white matter regions using a mask or specific ROIs. 2️⃣ The Direction Getter (Where do we go?): Our compass. We look up the nearest peak direction at our current coordinate to navigate forward. 3️⃣ The Stopping Criteria (When do we stop?): We terminate tracking if it hits low anisotropy (exiting white matter) or if the required turning angle is too sharp. Real biological fibers do not make 90 degree hairpin turns! 🎯 Strengths and Limitations 🔹 The Pros: Fast and computationally efficient. It yields clean, anatomically plausible reconstructions of major dense white matter highways. It is a massive workhorse for clinical visualization. 🔹 The Cons: Its strictness is its weakness. Relying entirely on the peak direction makes it highly vulnerable to noise. A single corrupted voxel can permanently derail a streamline. It also struggles to map smaller, highly curved, or fanning projections. ❇️ The Big Picture 🔹 Deterministic tracking acts as a powerful bridge between local voxel data and macroscopic brain architecture. It places heavy responsibility on the quality of your underlying local reconstruction to trace reliable pathways. ♻️ If this was helpful, please like, share, or comment so others can follow the series! Next week, we’ll embrace uncertainty with Probabilistic Tractography. Until then: what’s your favorite major white matter bundle to reconstruct? #DIPY #dMRIZeroToHero #DiffusionMRI #Neuroimaging #Tractography #Python
-
-
🍃 Welcome to Week 20 of our Diffusion MRI Zero To Hero series! For the past several weeks, we’ve been zooming in, focusing strictly on what happens inside a single voxel. Whether using DTI, CSD, or the full 3D propagators of SHORE, our goal was to extract local fiber orientations and microstructural properties. Now, we are zooming out. Welcome to the Tractography module! It’s time to take those local fiber directions and connect them across voxels to reconstruct the brain's 3D macroscopic wiring. ❔ What is Tractography? 🔹 Tractography is a 3D computational reconstruction technique that uses the local orientation information extracted from dMRI to trace the trajectories of white matter bundles (tracts) across the brain. 🔹 If local reconstruction gives us the compass needle in each voxel, tractography is the process of walking step-by-step through the brain, following that compass to map the highways. 🔍 Easing In: The Two Main Flavors of Tracking When we step through the brain, we need rules for how to choose our path. Broadly, these algorithms fall into two main categories: 🎯 Deterministic Tractography 🔹 How it works: This approach is strict and predictable. At every step, the algorithm looks at the local ODF (or tensor) and strictly follows the absolute peak direction. 🔹 The Analogy: Think of a train on a track. It follows the dominant path with no deviation. 🔹 Pros & Cons: It is computationally efficient and generates clean, well-defined pathways. However, because it ignores the uncertainty in the data, it can easily make the wrong turn at complex fiber crossings or stop prematurely if the signal drops. 🎲 Probabilistic Tractography 🔹 How it works: Instead of rigidly following the highest peak, probabilistic tracking acknowledges the noise and uncertainty in our data. At each step, it randomly samples a direction from the entire orientation distribution. 🔹 The Analogy: Think of exploring a city without a strict map, you are most likely to take the main roads, but sometimes you explore the side streets, mapping out a wider probability of available routes. 🔹 Pros & Cons: By running the algorithm thousands of times, it builds a robust "probability map" of connections, making it excellent at navigating complex crossings, kissing, and fanning fibers. The trade-off is heavier computation and the risk of generating false-positive connections. ❇️ The Big Picture 🔹 Local Models (Weeks 10-19): Give us the map and compass for every individual coordinate (voxel). 🔹 Tractography (Moving Forward): Uses that map to trace the actual journey from point A to point B, unlocking the study of structural connectivity and the human connectome. ♻️ Let us know in the comments: are you team Deterministic or team Probabilistic? *Tracking gif from Gabriel Girard's talk at Dipy Workshop https://lnkd.in/eERZxKkj #DIPY #dMRIZeroToHero #DiffusionMRI #Neuroimaging #Tractography #BrainMapping #MedicalImaging #Neuroscience #Python
-
-
🍃 Welcome to Week 19 of our Diffusion MRI Zero To Hero series! Previous SH based models we have seen recover fiber orientations from the angular profile of the diffusion signal. This week we will see methods that model the full 3D diffusion signal across both angular (directions) and radial (b-values) components to reconstruct the diffusion propagator (the probability distribution of how far and in which direction water molecules displace) and unlock new microstructural measures. ❔ Beyond Angular 🔹Signal decay across b-values encodes microstructural information like water restriction, compartment sizes and barrier spacing. 🔹Single-shell data gives you directions but not depth. Multi-shell acquisitions are needed to sample across b-values and access the radial dimension. 🔍 SHORE (Simple Harmonic Oscillator based Reconstruction and Estimation) 🔹SHORE (Ozarslan et al. 2008, 2009) pairs SH angular basis with radial basis functions derived from Hermite polynomials. 🔹Each basis function handles a specific combination of angular complexity and radial decay; together they can represent the full 3D diffusion signal. 🔹These basis functions are eigenfunctions of the Fourier transform, so the same fitted coefficients describe both the signal in q-space and the propagator in real space, without explicit Fourier transform computation. 🔹Fitting the basis to multi-shell HARDI data directly gives the full 3D diffusion propagator. 🔬 MAP-MRI (Mean Apparent Propagator MRI) 🔹MAP-MRI (Ozarslan et al. 2013) builds on the same foundation but uses a tensorial anisotropic scale parameter which improves its adaptability to very different signal profiles, especially in white matter areas. 🔹To handle noisy and sparse data, MAP-MRI enforces positivity constraints on the propagator. MAPL (Fick et al. 2016) further adds Laplacian regularization for improved robustness. ❇️ New Metrics from the Propagator 🔹RTOP (Return to Origin Probability) - probability of zero net displacement. Higher RTOP means water confinement, indicating smaller compartment volumes. 🔹RTAP (Return to Axis Probability) - probability of zero displacement perpendicular to the fiber axis. Higher RTAP suggests smaller cross-sectional area, relating to axon diameter. 🔹RTPP (Return to Plane Probability) - probability of zero displacement along the fiber axis. Higher RTPP suggests shorter compartment length. 🔹MSD (Mean Squared Displacement) - the average displacement of water molecules, low MSD indicates restricted movement. 🔹NG (Non-Gaussianity) - quantifies deviation from a Gaussian distribution. Can be decomposed parallel and perpendicular to the fiber direction. ♻️ If this was helpful, please like, share, or comment so others can follow the series! #DIPY #dMRIZeroToHero #DiffusionMRI #Neuroimaging #MedicalImaging #DiffusionMRIZeroToHero
-
-
🍃 Welcome to Week 18 of our Diffusion MRI Zero To Hero series! QBI / CSA gave us diffusion ODFs with peaks along fiber directions. But these peaks are broad and blunt because of the limited angular resolution of the acquisitions. When two fibers cross at a very narrow angle, their broad lobes merge and become indistinguishable. Hence the need for sharper peaks which is solved by Constrained Spherical Deconvolution (CSD). 🔬 How CSD Works 🔹Core assumption: the measured diffusion signal is the spherical convolution of the true fiber ODF with a single-fiber response function. 🔹The response function is the signal produced by a single, coherent fiber population estimated from high-FA voxels in the data (e.g. corpus callosum) where we can safely assume one fiber direction. 🔹If we know the response function and the measured signal, we can undo the blurring (deconvolve) to recover the sharp fODF. 🔹In SH space, convolution is just coefficient-wise multiplication and deconvolution is simply order by order division. Once again, SH turns a complex spherical operation into straightforward algebra. ❔ Why "Constrained"? 🔹Naive deconvolution is unstable, dividing by small values at high SH orders amplifies noise, producing negative fODF values and spurious peaks. 🔹Hence, a non-negativity constraint is added which ensures the fODF stays physically plausible (negative fiber density is physically meaningless). ❇️ Multi-Tissue CSD 🔹Single-shell CSD assumes every voxel is white matter. But voxels at tissue boundaries contain gray matter and CSF, which contaminate the fODF. 🔹Multi-tissue CSD uses multi-shell data with separate response functions for white matter (anisotropic), grey matter (isotropic), and CSF (isotropic). 🔹This separates out partial volume contamination, producing cleaner fODFs especially near the cortex and ventricles. ❇️ The Big Picture 🔹QBI/CSA: produces diffusion ODF (dODF) with peaks in the right direction, but broad and blurred. Limited angular resolution. 🔹CSD: produces fiber ODF (fODF) with sharp, narrow peaks that resolve crossing fibers down to ~30-40°. 🔹MT-CSD: cleaner fODFs with GM/CSF contamination removed. ♻️ If this was helpful, please like, share, or comment so others can follow the series! #DIPY #dMRIZeroToHero #DiffusionMRI #Neuroimaging #CSD #MedicalImaging #Neuroscience #DiffusionMRIZeroToHero
-
-
🍃 Welcome to Week 17 of our Diffusion MRI Zero To Hero series! In week 16, we introduced Spherical Harmonics, which gives us a compact representation of the diffusion signal on a sphere. This representation still needs to be transformed into an ODF with fiber-aligned peaks. 🔬 Q-Ball Imaging: The Funk-Radon Transform 🔹The diffusion signal on a single shell is strongest perpendicular to the fiber directions, not along them. 🔹QBI fixes this by asking: "how much signal lies in the plane perpendicular to this direction?" 🔹 If a direction aligns with the fiber, a great circle drawn perpendicular to it naturally passes through the highest signal values. Integrating along that plane gives a maximum, aligning peaks with fiber directions. 🔹This operation is the Funk-Radon Transform (FRT) - for each direction on the sphere, it integrates the signal along the perpendicular great circle, converting the signal into a fiber-aligned ODF. 🔬 Analytical Q-Ball 🔹SH are eigenfunctions of the FRT, meaning applying FRT simply rescales each SH coefficient by a known constant (a Legendre polynomial value). 🔹Hence, in Analytical Q-Ball the numerical integration computation is replaced with linear algebra, which is roughly 10-15x faster. 🔹Also introduced Laplace-Beltrami regularization to this process, penalizing high-frequency SH coefficients to keep ODF reconstructions smooth and robust to noise. 🔬 CSA: Fixing the Normalization 🔹Original QBI, when projecting the 3D diffusion propagator onto the sphere, did not properly account for the spherical volume element. The resulting ODF was not correctly normalized as a probability distribution. 🔹CSA fixes this by properly weighting the radial integral so that each direction represents an equal solid angle. 🔹In practice, SH coefficients are fitted to the log of the normalized signal rather than the raw signal, and the FRT scaling factors are updated accordingly. ✅Result: sharper, mathematically correct ODFs that better resolve fiber crossings. ❇️ The Big Picture ➡️ Spherical Harmonics: represent the signal. ➡️ QBI / CSA: transform geometry to recover orientations. ⚠️The diffusion ODF is still inherently blurry and close crossings remain hard to resolve. This motivated sharper approaches like CSD which we will see next week. ♻️ If this was helpful, please like, share, or comment so others can follow the series! #DIPY #dMRIZeroToHero #DiffusionMRI #Neuroimaging #QBall #CSA #MedicalImaging #Neuroscience #Tractography
-
-
🍃 Five days. 70+ participants. 18 countries. 🍃 Countless questions and amazing discussions. Last week we wrapped up the #DIPYWorkshop2026, and we are still buzzing from the energy you all brought. From Day 1 to the Final Assembly, thank you for showing up, engaging, and making this week unforgettable. But beyond the technical content, what stood out most was the community. We learned just as much from your as we hope you learned from us.💯 The thoughtful questions. The engaging discussions. The dedication of you participants who joined every session despite time zone challenges. To everyone who woke up early or stayed up late to join us across time zones, we see you, and we appreciate you dearly!💙 The workshop may be over, but our connection is just getting started. We would love to keep you involved in the DIPY community, whether through open-source contributions, collaborations, or simply staying in touch. There is always a place for you here! Ask us anything: workshop@dipy.org #DIPY #dMRI #DiffusionMRI #Neuroimaging #OpenSource #DIPYWorkshop #MedicalImaging
-
-
🍃☄️We just released a preprint on SuCor, a novel susceptibility distortion correction method for EPI-based diffusion MRI done in matter of SECONDS! ☑️ Susceptibility distortion has long been a challenge in diffusion imaging, and SuCor offers a fresh approach that is robust, physically meaningful, and practical for real-world data. Amazing work Sreekar Chigurupati, soon in DIPY!👏💯 #DIPY #OpenSource #dMRI #MedicalImaging #Distortion #Neuroimaging #DIPYWorkshop2026
New preprint out! 🚀 Preprint: https://lnkd.in/eGXKZrMJ Susceptibility distortion correction in diffusion MRI typically takes tens of minutes with tools like FSL TOPUP. We asked: what if we reframe the problem as a transport problem? Introducing SuCor - a parameter-free method that corrects EPI susceptibility distortions in ~12 seconds on a single CPU core. The key idea: Reformulate the distortion as a mass transport problem with a closed-form solution. We regularize the resulting field in the spectral domain with the regularization strength selected automatically. No config files. No parameter tuning. On HCP data, SuCor achieves 7.6% higher mutual information with the T1 structural reference compared to TOPUP, suggesting it captures fine-grained local distortions more faithfully than smooth B-spline parameterizations. ⏱️ ~12 seconds vs. ~55 minutes 📈 Better anatomical fidelity (T1-MI: 0.341 vs. 0.317) 🔧 Zero parameters to tune SuCor will soon be available in Diffusion Imaging in Python (https://dipy.org), bringing fast, principled distortion correction to the open-source neuroimaging community. Would love to hear your thoughts - especially from folks working on dMRI preprocessing pipelines! #DiffusionMRI #Neuroimaging #OpenSource #DIPY #MRI #BrainImaging
-
-
What an incredible start! Over 70 participants from around the world joined us for Day 1 of the #DIPYWorkshop2026. We must say we are HYPED!🔥 A huge thank you to all the participants for your enthusiasm, your questions, your patience, and most importantly, your energy. These inspire us to keep moving forward! The discussions were fantastic, and we are looking for more of such discussions. Here is day 1 highlights: 🔹 Workshop Overview — Professor Eleftherios Garyfallidis kicked off the week with an introduction to the DIPY framework and the latest advancements in diffusion MRI analysis. 🔹 DIPY AUTO — Serge Koudoro introduced our new automated pipeline, making advanced dMRI analysis accessible to everyone. 🔹 SUCOR — Sreekar Chigurupati presented our novel susceptibility distortion correction method. 🔹 Intro to Neuroanatomy — Professor Wei Tang provided a foundational introduction to computational neuroanatomy for diffusion MRI workflows. 🔹 Guided Practice & Round Table — This was about getting to know our participants and their challenges. See you all tomorrow at 9:00 AM ET for Day 2: Reconstruction! 🚀 🔗 workshop.dipy.org #DIPY #DiffusionMRI #Neuroimaging #OpenSource #Workshop #BrainConnectivity #MedicalImaging