Skip to content

INDI is a command line tool to process in-vivo cardiac diffusion tensor imaging.

License

Notifications You must be signed in to change notification settings

ImperialCollegeLondon/INDI

Repository files navigation

INDI (in-vivo diffusion)

In-vivo diffusion analysis (INDI)
Post-processing pipeline for in-vivo cardiac diffusion tensor imaging.

Table of Contents

Introduction

This software is a post-processing pipeline designed for in-vivo cardiac diffusion tensor imaging. It currently accepts Siemens and Philips diffusion weighted DICOM data, as well as anonymised NIFTI data. It also supports both STEAM and spin-echo data.

After the data is loaded, the pipeline performs the following steps:

  • Image registration
  • Image curation
  • Tensor fitting
  • Segmentation
  • Export results

workflow

INDI runs from the command line, and when processing a dataset for the first time, INDI will require user input (pop-up matplotlib windows) which will be saved for future runs.

For more details:

See documentation for details on the post-processing pipeline.

See YAML settings for run configuration details.

Installation

Software has been tested on:

  • macOS 15.0 with python 3.12
  • Ubuntu 22.04 with python 3.12
  • Windows 11 with python 3.12

Clone the repository

Install git for your OS.

Then clone the repository.

git clone https://github.com/ImperialCollegeLondon/INDI.git

Installation in macOS (Intel and Apple silicon) with pip

You may need to instal Xcode and Xcode’s Command Line Tools package as well, with this command:

xcode-select --install

Then install homebrew.

With homebrew install python 3.12:

brew install [email protected]

Also install imagemagick:

brew install imagemagick

Install the python environment in the INDI root directory:

python3.12 -m venv .venv
source .venv/bin/activate
pip install -U pip setuptools wheel pip-tools
pip install -r requirements.txt

Installation in Ubuntu 22.04 with conda

install imagemagick:

sudo apt install imagemagick

Install miniforge: Miniforge

Install the python environment with conda:

conda env create -f environment-cpu.yml

Or alternatively, if you have a CUDA compatible GPU for Win or Linux:

conda env create -f environment-gpu.yml

Installation Windows 11 with conda

Install miniforge: Miniforge

Install the python environment with conda:

conda env create -f environment-cpu.yml

Or alternatively, if you have a CUDA compatible GPU for Win or Linux:

conda env create -f environment-gpu.yml

Install imagemagick.

Development

For development, also install the git hook scripts:

pre-commit install

Now pre-commit will run automatically on git commit. You can also run it manually with:

pre-commit run --all-files

This is required to ensure code quality and style before committing code changes.

Basic usage example

We are going to post-process a synthetic phantom dataset with non-rigid distortions. Please unzip the phantom data.

The test_phantom_cdti_dicoms folder contains a subfolder named diffusion_images with the cdti simulated DICOMs. The DICOM files contain noisy diffusion weighted images with periodic non-rigid distortions, simulating a typical in-vivo scan.

INDI always looks recursively for subfolders named diffusion_images. The DICOM files must be inside this folder.

Before running we should have a look at the settings.yaml file, and check if the parameters makes sense. See YAML settings for more information. For this phantom example, the default settings should be fine.

Then run in the INDI python environment:

python main.py <data_path>

Where <data_path> is a folder that must contain at least a subfolder named diffusion_images with all the DICOM files.

In the video tutorial below we show how to run INDI with the phantom data:

Watch the video tutorial

License

INDI is licensed under the terms of the BSD license. Please see the LICENSE file.

If you use this software, please credit this website and "The CMR unit, Royal Brompton Hospital".

Aknowledgements

  • Royal Brompton Hospital (Guy's and St Thomas' NHS Foundation Trust), London UK.
  • Imperial College, London UK.
  • This work was supported by the British Heart Foundation RG/19/1/34160 and RG/F/23/110115.
  • Chan Zuckerberg Initiative DAF, an advised fund of the Silicon Valley Community Foundation: 2024-337787.
  • EPSRC Healthcare Technologies EP/X014010/1.

About

INDI is a command line tool to process in-vivo cardiac diffusion tensor imaging.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages