Releases: OSIPI/TF2.4_IVIM-MRI_CodeCollection
v0.1.0 – IVIM MRI Code Collection (OSIPI TF2.4, first release for 2026 MRM paper)
Release Notes — OSIPI TF2.4 IVIM-MRI Code Collection v0.1.0
Release date: 2026
Repository: https://github.com/OSIPI/TF2.4_IVIM-MRI_CodeCollection
License: Apache-2.0
Associated publication: Jalnefjord, Rashid et al., Magnetic Resonance in Medicine (in press)
Overview
This is the first public release of the OSIPI Task Force 2.4 IVIM-MRI Code Collection — an open-source repository for intravoxel incoherent motion (IVIM) analysis of diffusion-weighted MRI data, developed under the ISMRM Open Science Initiative for Perfusion Imaging (OSIPI).
The goal of this release is to improve the reproducibility of IVIM research, eliminate duplicate development of in-house pipelines, and lower the barrier for publishing IVIM-related code open-source.
What's Included
Code Contributions
Code contributions were received from 8 institutions, comprising a total of 32 fitting algorithms implemented in Python (29) or MATLAB (3):
| Algorithm type | Count |
|---|---|
| Nonlinear least squares (NLLS) | 20 |
| Linear least squares (LLS) | 5 |
| Bayesian inference | 2 |
| Variable projection | 2 |
| Deep learning / neural network | 2 |
| Non-negative least squares (NNLS) | 1 |
Algorithms are available for single-step fitting (17) and segmented/multi-step fitting (15). The supported signal models are:
- Biexponential (standard IVIM, Eq. 1): 26 algorithms
- Simplified IVIM (D and f only): 2 algorithms
- Triexponential: 4 algorithms
Contributing institutions: Amsterdam UMC, Lund University, Maastricht University Medical Center, the Netherlands Cancer Institute, University of Gothenburg, SRI International, Memorial Sloan Kettering Cancer Center, and Technion IIT.
A full list of algorithms and their authors is provided in doc/code_contributions_record.csv and in Table 1 of the associated publication.
Consensus Reference Algorithm
The repository includes TF_reference_IVIMfit, the consensus algorithm recommended by the ISMRM workshop on "Moving Forward with IVIM Modeling for Diffusion-Weighted MRI" (March 2024). This uses a segmented fitting approach with weighted linear least squares (WLLS) fit to the log-transformed signal, with a b-value cut-off of 300 s/mm² for brain and 200 s/mm² for other applications.
Wrapper Code (OsipiBase)
A unified Python wrapper (OsipiBase) provides a common programming interface to all contributed fitting algorithms. Key features:
- Standardized inputs and outputs across all algorithms (b-values, fit bounds, initial guesses, cut-off values)
- Switching between algorithms requires changing a single argument:
OsipiBase(algorithm="...") - Core methods:
osipi_fit()(voxel-wise, parallelized),osipi_fit_full_volume()(for volume-aware algorithms such as Bayesian methods) - Utility methods:
osipi_print_requirements(),osipi_author(),osipi_simple_bias_and_RMSE_test(), andcite() - MATLAB contributions are callable via
matlab.engineon systems with a valid MATLAB license
See the usage example notebook at doc/wrapper_usage_example.ipynb.
Digital Reference Objects (DROs)
Two digital reference objects (anthropomorphic phantoms) are provided for testing and benchmarking:
- Brain DRO — based on the ICBM 2009a nonlinear symmetric 3T atlas, with IVIM parameters assigned per tissue type (white matter, gray matter, CSF) from the literature; 17 b-values; Rician noise added
- Abdominal DRO — based on a Python translation of the ERIC/MR-XCAT phantom with an integrated IVIM signal decay model; 18 b-values; optional motion and interleaved scanning simulation
Both DROs and accompanying in vivo datasets (brain and abdomen, acquired on 3T Philips systems with informed consent) are available on Zenodo (DOI: 10.5281/zenodo.14605039) and can be downloaded directly using download_data() from the repository's utility functions.
Automated Testing
All 26 wrapped biexponential algorithms pass a comprehensive automated test suite implemented with pytest. Tests cover:
- Integration & functional testing — verifies correct integration into the wrapper and intended functionality
- Accuracy testing — checks that parameter estimates fall within broad but reasonable bounds for high-SNR phantom data (SNR = 2000)
- Default fit bounds — verifies that default bounds and initial guesses are physically sensible
- Adherence to fit bounds — confirms that algorithms respect user-specified bounds
- Computation time — flags algorithms exceeding 0.5 s per voxel
- Regression/longitudinal stability — compares outputs against a reference run across multiple SNR levels (10–200) using T- and F-tests
Deep learning algorithms are tested separately at lower SNR (SNR = 25) with wider tolerances.
Tests run automatically via GitHub Actions on each pull request across:
- Linux and macOS (Python 3.11, 3.12, 3.13)
- Windows (Python 3.11, 3.12)
Getting Started
Install dependencies:
pip install -r requirements.txt
Basic usage:
from src.standardized.IAR_LU_biexp import IAR_LU_biexp
algorithm = IAR_LU_biexp()
fit = algorithm.ivim_fit(signal, bvalues)
To switch to a different algorithm, only the import and instantiation line need to change. See the introductory notebook for a full walkthrough:
doc/Introduction_to_TF24_IVIM-MRI_CodeCollection_github_and_IVIM_Analysis_using_Python.ipynb
Known Limitations
- MATLAB testing is only available locally (requires a valid MATLAB license); GitHub Actions runners do not support
matlab.engine - Wrapper and automated testing currently cover biexponential fitting algorithms only; triexponential and simplified IVIM code is included in the repository but not yet integrated into the wrapper
- Deep learning contributions are underrepresented relative to the current state of the field, partly due to greater code complexity
How to Cite
If you use this repository, please cite:
Jalnefjord O*, Rashid IA*, Kuppens D, van der Thiel MM, van Houdt PJ, Voorter PHM, Peterson ET, Gurney-Champion OJ. An open-source code repository for intravoxel incoherent motion analysis: ISMRM Open Science Initiative for Perfusion Imaging (OSIPI). Magnetic Resonance in Medicine (in press).
To cite a specific algorithm, use the cite() method:
fit = OsipiBase(algorithm="IAR_LU_biexp")
fit.cite()
DOIs for individual contributions are listed in doc/code_contributions_record.csv.
How to Contribute
New code contributions are welcome and continuously accepted. Please see:
We especially welcome contributions of pre-processing code (denoising, motion correction, registration) and additional programming language implementations.
Acknowledgements
We thank Stefan Zijlema for his work in establishing the task force and Ben Neijndorff for implementing the consensus algorithm. We also thank all code contributors, including the groups of Amita Shukla-Dave (Memorial Sloan Kettering Cancer Center) and Moti Freiman (Technion IIT).
Funding: ALF-agreement (ALFGBG-942664), KWF Dutch Cancer Society (KWF-UVA 2021.13785), NWO-VIDI (20367), NIH (R21 NS 13210101), Swedish Cancer Society (21 1910 S), Alzheimer Nederland (WE.03-2024-04).
# Release Notes — OSIPI TF2.4 IVIM-MRI Code Collection v0.1.0Release date: 2026
Repository: https://github.com/OSIPI/TF2.4_IVIM-MRI_CodeCollection
License: Apache-2.0
Associated publication: Jalnefjord, Rashid et al., Magnetic Resonance in Medicine (in press)
Overview
This is the first public release of the OSIPI Task Force 2.4 IVIM-MRI Code Collection — an open-source repository for intravoxel incoherent motion (IVIM) analysis of diffusion-weighted MRI data, developed under the ISMRM Open Science Initiative for Perfusion Imaging (OSIPI).
The goal of this release is to improve the reproducibility of IVIM research, eliminate duplicate development of in-house pipelines, and lower the barrier for publishing IVIM-related code open-sour...
Python 3.9-3.13
A version of the repository that still works with Python version 3.9-3.13