Compute perfusion parameters for a 4D perfusion image using an Arterial Input Function extracted from vessel centerlines.
- Git version control
- Python 3.8 or later
Follow these steps to run Perfusion-Analysis-Toolbox
scripts on your local data:
git clone git@github.com:KitwareMedical/Perfusion-Analysis-Toolbox.git
python -m pip install path/to/Perfusion-Analysis-Toolbox
Sample data files are provided at data.kitware.com
.
We recommend downloading that data into the directory
Perfusion-Analysis-Toolbox/Data
In the Data directory, you can run the provided data-download.sh script to download the testing / demonstration data:
pip install girder-client
./data-download.sh
Alternatively, you may provide your own 4D_CTP, 3D_CT_BrainMask, and 3D_CT_VesselCenterlinesMask images for perfusion analysis.
perfusion-compute-cli --image-path <image-path> --mask-path <mask-path> --vessel-path <vessel-path> --save-path <save-path>
or
python -m perfusion-compute-cli --image-path <path/to/4D-CT-Perfusion-Image> --mask-path <path/to/3D-Mask-Image> --vessel-path <path/to/3D-Vessel-Centerline-Image> --save-path <path/to/save-directory>
To run the sample data, once it has been downloaded (see above), type
mkdir Results
perfusion-compute-cli --image-path ./Data/CTP04_4DCTP_Registered_15x15x5.nii.gz --mask-path ./Data/CTP04_CT_BrainMask_15x15x5.nii.gz --vessel-path ./Data/CTP04_CT_VesselCenterlinesMask_15x15x5.nii.gz --save-path Results
- CBV, CBF, CTC and MTT images are saved under the
--save-path
folder. - To view gamma variate fit for the chosen AIF, navigate to src and open high-res-aif.png.
Community contributions are welcome. Follow these steps to contribute to Perfusion-Analysis-Toolbox
:
- Fork the
Perfusion-Analysis-Toolbox
repository under your user account on GitHub. - Clone the project to your PC.
- Make local code changes.
- Install developer tools.
python -m pip install path/to/Perfusion-Analysis-Toolbox[develop]
- Run auto-formatting with
black
andruff
linting tools.
black ./src
ruff check ./src --fix --show-fixes
- Commit changes to a development branch under your user account.
- Create a pull request.
- Peruzzo, Denis, et al. “Automatic Selection of Arterial Input Function on Dynamic Contrast-Enhanced MR Images.” Computer Methods and Programs in Biomedicine, vol. 104, no. 3, 2011, https://doi.org/10.1016/j.cmpb.2011.02.012.
- https://github.com/marcocastellaro/dsc-mri-toolbox
- https://github.com/KitwareMedical/ITKTubeTK-CTHead-Perfusion/tree/main
- https://github.com/peirong26/Perfusion-Analysis-Toolbox