Fetal and Neonatal Development Imaging (FEDI) is a free and open-source software that provides a suite of command-line tools for processing and analyzing fetal and neonatal MRI data.
While FEDI is primarily designed for fetal and neonatal MRI, several tools are applicable to general MRI processing. In summary, FEDI provides:
-
Gradient and b-vector tools: Rotation of b-vectors, gradient-scheme conversion, and q-weight utilities.
-
Diffusion MRI preprocessing: Denoising, Gibbs artifact removal, and bias-field correction.
-
Outlier detection and weighting: Identification and weighting of outlier volumes, slices, or voxels for robust diffusion MRI processing.
-
Reconstruction: Diffusion signal reconstruction with integrated outlier weighting.
-
Motion correction for diffusion MRI: Robust intra- and inter-volume motion correction designed for fetal and neonatal data, but compatible with any population.
-
FOD estimation: Fiber-orientation distribution estimation using a pretrained spherical CNN model optimized for neonatal diffusion MRI.
There are multiple ways to install the FEDI toolbox.
The easiest way to install FEDI is through pip. Open a terminal and run:
pip install fediTo manually install the FEDI toolbox and primarily access its workflows, clone the repository and add the necessary paths to your .bashrc file:
git clone https://github.com/FEDIToolbox/FEDI.git
cd FEDI/FEDI/scripts
FEDI_SCRIPTS=$(pwd)
echo 'export PATH="${FEDI_SCRIPTS}:$PATH"' >> ~/.bashrc
source ~/.bashrcWorkflows such as HAITCH are available in:
cd FEDI/FEDI/pipelinesWe are currently working on providing an installation option via Conda for easier dependency management.
After installing FEDI, we recommend verifying that the installation is working correctly by running the automated test suite:
fedi_testingThis command will:
- Generate synthetic test data: Creates realistic 4D diffusion MRI data with fixed parameters in
~/.fedi_test_data/ - Run automated tests: Tests all FEDI command-line tools and verifies that they execute correctly and produce expected outputs
The test suite will report which tools passed, failed, or were skipped (due to missing optional dependencies). Some tests may take several minutes to complete, especially fedi_dmri_moco and fedi_dmri_recon.
For more information about the testing command, see the documentation.
FEDI supports DICOM, NIfTI, and MIF image formats and relies on several external dependencies for full functionality.
We strongly recommend using the Anaconda Python distribution to manage dependencies efficiently.
These packages are automatically installed when you install FEDI via pip:
- NumPy - Numerical computing
- SciPy - Scientific computing
- NiBabel - Neuroimaging file I/O
- Matplotlib - Plotting and visualization
- DIPY - Diffusion imaging in Python
- CVXPY - Convex optimization
- Healpy - Spherical harmonics and HEALPix
- PyTorch - Required for fedi_dmri_fod (FOD estimation)
- Hugging Face Hub - Required for fedi_dmri_fod (model downloads)
For questions, issues, or suggestions, please open an issue on our GitHub repository.
If you use FEDI in your research, please cite:
HAITCH Framework: Snoussi, Haykel, Davood Karimi, Onur Afacan, Mustafa Utkur, and Ali Gholipour. HAITCH: A framework for distortion and motion correction in fetal multi-shell diffusion-weighted MRI. Imaging Neuroscience 2025.
FOD Estimation: Snoussi, Haykel, and Davood Karimi. Equivariant Spherical CNNs for Accurate Fiber Orientation Distribution Estimation in Neonatal Diffusion MRI with Reduced Acquisition Time. Frontiers in Neuroscience 2025.