Skip to main content

A package for dynamic NIFTI analysis

Project description

Banner

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

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

nifti_dynamic-0.3.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nifti_dynamic-0.3.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file nifti_dynamic-0.3.1.tar.gz.

File metadata

  • Download URL: nifti_dynamic-0.3.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.16

File hashes

Hashes for nifti_dynamic-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a87809757d71658e18a45cb4e829317592e2f31d21676fa9d3c5d21fc058f379
MD5 702e28f75d203b36a62ca81acf9f7a5c
BLAKE2b-256 25b347b038e7fc874631396be1b0277ffd3ab9c78ce72c5ae7885fc5d49db26c

See more details on using hashes here.

File details

Details for the file nifti_dynamic-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nifti_dynamic-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 418f5f81576a5c73247949138e69987a19c3702b57ed50d4eecda03d859f32a6
MD5 de5b91091ccf8e33ae0879595f3221fc
BLAKE2b-256 35ab4a567d325f95a860e55a48b77078480da0bfa0cc82e16a51565112424b23

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page