A package for dynamic NIFTI analysis
Project description
nifti_dynamic 🧠⚡
Efficient TAC extraction and Patlak analysis of HUGE PET arrays in NIfTI format. Works with gzipped 4D PET images (saving 90% disk space vs DICOM) 📦. All algorithms load partial chunks to prevent memory crashes when handling massive arrays (440×440×645×69×4 bytes = 32GB).
Implementation based on Andersen TL, et al. Diagnostics 2024;14(15):1590. doi:10.3390/diagnostics14151590
Installation 💾
pip install nifti_dynamic
Important: Always ensure indexed_gzip is installed for significantly faster reading of gzipped NIfTI arrays (.nii.gz) ⚡
Performance ⏱️
- Automatic extraction of 4 VOIs: 30 seconds
- TAC for single organs: 10 seconds
- TACs for all 114 TotalSegmentator organs: 10 minutes
- Full voxel Patlak for 440×440×645×69 array: 30 seconds
CLI Usage 🚀
Extract Input Function from Aorta
extract_input_function \
--pet dpet.nii.gz \
--totalseg totalseg.nii.gz \
--output ./results
Extract TACs for All Organs
extract_tacs \
--pet dpet.nii.gz \
--segmentation totalseg.nii.gz \
--output ./tacs
Voxel-wise Patlak Analysis
voxel_patlak \
--pet dpet.nii.gz \
--input-function input_fun.csv \
--output ./patlak
Downsample Dynamic PET (2x)
resample_pet \
--pet dpet.nii.gz \
--output dpet_2x.nii.gz
Python API Usage
For programmatic access, see example.py for detailed Python API usage.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nifti_dynamic-0.2.0.tar.gz.
File metadata
- Download URL: nifti_dynamic-0.2.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea598cd57deff9128217baf634d937c66e3fbdcb4a384dd1fce581637d64bd43
|
|
| MD5 |
7887fe080195d35a30b48a65c3efba22
|
|
| BLAKE2b-256 |
e2a9dd6df41ac5f0f468533bcb3093f34ece0a3f02214bdba6d8b7b8020f44eb
|
File details
Details for the file nifti_dynamic-0.2.0-py3-none-any.whl.
File metadata
- Download URL: nifti_dynamic-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6302b135bca0f28852e720500ed8ea15e6d079ad5761df3e73a8ecb700f299a
|
|
| MD5 |
605630d1e76890e04b2172a43537d1d2
|
|
| BLAKE2b-256 |
e71489cfee1818012d17e6a8dd6880b22760e0219a1a589f9ddcb23e1b949f8d
|