Library / SDK
dipy/dipy avatar
dipy/dipy

DIPY: diffusion MRI analysis in Python, and where it stops being the right tool

DIPY is the paragon 3D/4D+ medical imaging library in Python. Contains generic methods for spatial normalization, signal processing, machine learning, statistical analysis and visualization of medical images. Additionally, it contains specialized methods for computational anatomy including diffusion, perfusion and structural imaging.

841 stars506 forksPythonNOASSERTION

At a glance

What is it?
DIPY packages tractography, denoising, registration and microstructure fitting behind a NumPy-based Python API. It is research software with an explicit clinical-use caveat, and the interesting question is where its scope ends.
Who is it for?
Adopt DIPY if you are doing diffusion or perfusion research in Python and want tractography, denoising and microstructure models importable from the same environment as the rest of your analysis. Do not adopt it as clinical software: the README states plainly that DIPY is for research only and asks that you contact admins@dipy.org if you plan to deploy it in clinical settings.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap DIPY fills: diffusion-weighted volumes are not ordinary images

A diffusion MRI acquisition is not one image. It is a series of volumes, each sensitised along a different gradient direction and at one or more b-values, and the quantity a researcher usually wants (an orientation distribution, a tensor, a fibre pathway) does not exist in any single volume. Recovering it means fitting a model per voxel, resampling across a spherical domain, and then tracing paths through the resulting field. DIPY is a Python library built around that chain. The README describes it as "a python library for the analysis of MR diffusion imaging", and the repository topics list the pieces: diffusion-mri, dti, dki, spherical-harmonics, tractography, tractometry, denoising, registration, segmentation, microstructure. The stated audience is research groups working in Python who would otherwise assemble this from MATLAB toolboxes, C++ binaries and glue scripts. The README is explicit that this is not a clinical product: DIPY is for research only, and anyone planning a clinical deployment is asked to contact admins@dipy.org first. That sentence is the single most important line in the repository for anyone evaluating it for patient-facing work.

What the repository layout tells you about the architecture

DIPY is distributed as one installable package rather than a set of command-line binaries, and the topic list is effectively a map of its internal modules: registration, segmentation, denoising, spherical harmonics, tracking, tractometry. The practical consequence is that a diffusion pipeline is ordinary Python. You import functions, pass arrays, and get arrays back, which means the intermediate state is inspectable at every step instead of being serialised between executables. The dependency policy reinforces this. The README states that DIPY follows the Scientific Python SPEC 0 recommendation on minimum supported versions "as closely as possible", covering both Python and its dependencies, and points to a Toolchain Roadmap page in the development docs. Read that as a commitment to tracking NumPy and the wider scientific stack rather than pinning to old versions indefinitely. It also means an environment that is several Python releases behind will eventually fall outside the supported window, and the roadmap page, not the README, is where the current floor is defined. I cannot state the exact minimum from the material supplied here, and you should not assume one.

Installing DIPY and the version you actually get

The README gives two commands and no others. With pip: pip install dipy. With conda: conda install -c conda-forge dipy. For anything beyond that, including building from source, it defers to the installation page at docs.dipy.org/stable/user_guide/installation.html. There is no configuration file, no environment variable and no service to start; installation is the whole setup step. The version question is where you should pay attention. The two most recent releases listed are 1.12.0, dated 2026-03-16, and 1.12.1, dated 2026-04-23. A patch release roughly five weeks after a minor release is a normal cadence, but it means an unpinned pip install and a conda solve performed at different times can land on different code. If you are reproducing a published analysis, pin the version in your requirements or environment file rather than relying on the resolver. The default branch is master and the repository is not archived, so the development tree and the released tree are separate things, and the README links to both the documentation for all releases and the current development tree.

The licence metadata does not match the README

This is the detail most likely to cause a problem downstream, so it deserves its own section. The repository metadata supplied for dipy/dipy reports the licence as NOASSERTION, which is what GitHub records when it cannot classify a licence file automatically. The README says something different and specific: DIPY is licensed under the terms of the BSD license, with a link to the LICENSE file in the repository, and the README also carries a BSD 3-Clause badge pointing at that same file. The likely explanation is a LICENSE file whose formatting defeats the classifier, not a genuine licensing dispute, but you should not resolve that by inference. Open the LICENSE file and read it. BSD 3-Clause is permissive and generally compatible with commercial and closed-source use, subject to its attribution and no-endorsement conditions, but I am not giving legal advice and the metadata mismatch is exactly the kind of thing a legal or compliance reviewer will flag. If your organisation requires an automated licence scan to pass, a NOASSERTION result may block the dependency regardless of what the file actually says.

Where DIPY is the wrong choice

Two boundaries are visible in the material. The first is clinical use. The README does not hedge: DIPY is for research only, and clinical deployment requires contacting the maintainers first. If you need a regulated, validated, traceable pipeline with a support contract, this is not it, and the maintainers say so themselves. The second boundary is scope. DIPY is diffusion-centric. Its generic methods cover spatial normalization, signal processing, machine learning, statistical analysis and visualization of medical images, and the specialised methods cover computational anatomy across diffusion, perfusion and structural imaging. But a study that is mostly functional MRI, mostly cortical surface analysis, or mostly statistical modelling of non-imaging clinical variables will find the diffusion-specific machinery irrelevant, and the general-purpose parts of DIPY are not what the project is organised around. There is also a maintenance-cost dimension that the version policy implies rather than states. Following SPEC 0 means the supported dependency window moves; a pipeline frozen two years ago will need periodic dependency bumps and re-validation, and the burden of that falls on you, not on the project. No release cadence or support commitment is given in the material beyond the two dated releases.

How this differs from a general neuroimaging framework

The obvious comparison is with a broad neuroimaging framework such as Nilearn, which is built on scikit-learn and oriented toward decoding, connectivity and statistical learning on already-preprocessed images. The difference is in what sits at the centre of the abstraction. Nilearn's core objects are masked 4D volumes and the estimators that operate on them; DIPY's core objects are the diffusion-specific representations that do not exist until you construct them, meaning spherical harmonic coefficients, per-voxel model fits, and streamlines. You can run a decoding analysis in Nilearn without ever thinking about gradient tables or b-values. You cannot do tractography in DIPY without them, because the gradient information is the input, not metadata. That is the real distinction: DIPY models the acquisition physics, and a general framework models the statistical problem. They are complementary rather than competing, and a diffusion study will plausibly use both, with DIPY producing the derived maps and a general framework consuming them. The choice is about where the modelling effort belongs, not about which library is better.

Editorial conclusion

Adopt DIPY if you are doing diffusion or perfusion research in Python and want tractography, denoising and microstructure models importable from the same environment as the rest of your analysis. Do not adopt it as clinical software: the README states plainly that DIPY is for research only and asks that you contact admins@dipy.org if you plan to deploy it in clinical settings. Before committing, verify three things: which of the two recent releases (1.12.0 or 1.12.1) your pinned dependencies resolve against, what the actual LICENSE file text says rather than the repository metadata, and whether your pipeline needs a method that lives in a sibling project such as Nilearn rather than in DIPY.

Official sources

  1. dipy/dipy on GitHub
  2. Issues
  3. Project website
  4. README
  5. Releases
Community notes

Community notes