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

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

nifti_dynamic-0.2.0.tar.gz (17.3 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.2.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

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

Hashes for nifti_dynamic-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ea598cd57deff9128217baf634d937c66e3fbdcb4a384dd1fce581637d64bd43
MD5 7887fe080195d35a30b48a65c3efba22
BLAKE2b-256 e2a9dd6df41ac5f0f468533bcb3093f34ece0a3f02214bdba6d8b7b8020f44eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nifti_dynamic-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6302b135bca0f28852e720500ed8ea15e6d079ad5761df3e73a8ecb700f299a
MD5 605630d1e76890e04b2172a43537d1d2
BLAKE2b-256 e71489cfee1818012d17e6a8dd6880b22760e0219a1a589f9ddcb23e1b949f8d

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