Ivim
An end-to-end python package for intravoxel incoherent motion (IVIM) analysis of diffusion MRI data
Install / Use
/learn @oscarjalnefjord/IvimREADME
ivim - An end-to-end python package for intravoxel incoherent motion (IVIM) analysis of diffusion MRI data
The ivim python package provides functionality for the main steps associated with IVIM analysis of diffusion MRI data including:
- Methods for IVIM parameter estimation / model fitting
- Simulation of MRI data based on IVIM models
- Optimization of b-values
- Preprocessing, both basic operations like extracting image data with a specific b-value or averaging of diffusion encoding directions, and specific methods like correction for signal drift
The file formats used are the ones used by FSL, i.e. .nii.gz for image data, .bval for b-values and .bvec for diffusion encoding directions. File with ending .cval is also used for c-values in analogy to .bval for b-values to describe flow encoding.
Dependencies
The ivim python package relies heavly on numpy for numerical operations, uses nibabel for reading and writing nifti file, and uses scipy for some specific minimization/optimization tasks. A python version >= 3.10 is required.
How to install
The suggested way to install is to first prepare an environment suitable for the ivim package using e.g. venv with a compatible python version (>= 3.10):
python3 -m venv .ivim
Activate the environment:
source .ivim/bin/activate
To install the package, run:
python3 -m pip install ivim-mri
References
The following work describe some of the algorithms implemented in the package.
-
Jalnefjord et al. Comparison of methods for estimation of the intravoxel incoherent motion (IVIM) diffusion coefficient (D) and perfusion fraction (f). Magnetic Resonance Materials in Physics, Biology and Medicine 2018; 31(6):715-723. https://doi.org/10.1007/s10334-018-0697-5
-
Gustafsson et al. Impact of prior distributions and central tendency measures on Bayesian intravoxel incoherent motion model fitting. Magnetic Resonance in Medicine 2018; 79(3):1674-1683. https://doi.org/10.1002/mrm.26783
-
Jalnefjord et al. Optimization of b‐value schemes for estimation of the diffusion coefficient and the perfusion fraction with segmented intravoxel incoherent motion model fitting. Magnetic Resonance in Medicine 2019; 82(4):1541-1552. https://doi.org/10.1002/mrm.27826
