Skip to main content

Collection of tools to derive metrics from physical phantoms used in QA of medical imaging instruments.

Project description

PhantomKit

CI/CD Codecov PyPI version Python versions Documentation Status

PhantomKit

PhantomKit is a Python toolkit for automated quality assurance (QA) of medical imaging scanners using physical phantoms. It provides pydra-based workflows that register phantom scans to a reference template, extract per-vial signal statistics across multiple contrast types, and generate publication-quality plots — supporting both MRI and PET phantom protocols.

Features

  • Template-based registration — iterative ANTs SyN registration with automatic orientation search across a rotation library
  • Vial metric extraction — per-vial mean, median, std, min and max across all contrast images, written to CSV
  • Plotting — scatter plots of vial intensity and parametric map plots (T1/IR, T2/TE) with mrview ROI overlays
  • Protocol support — extensible protocols sub-package for phantom- and project-specific workflow configurations
  • Parallel batch processing — pydra-native splitting and combining for multi-session datasets

Installation

python -m pip install phantomkit

Basic usage

from phantomkit.protocols.gsp_spirit import GspSpiritAnalysis

wf = GspSpiritAnalysis(
    input_image="/data/session01/t1_mprage.nii.gz",
    template_dir="/templates/gsp_spirit",
    output_base_dir="/results",
    rotation_library_file="/templates/gsp_spirit/rotations.txt",
)
outputs = wf(cache_root="/data/cache-root")

Or via the command line:

phantomkit run gsp-spirit /data/session01/t1_mprage.nii.gz \
    --template-dir /templates/gsp_spirit \
    --output-dir /results \
    --rotation-lib /templates/gsp_spirit/rotations.txt

License

Copyright 2026 Australian Imaging Service. Released under the Apache License 2.0.

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

phantomkit-0.1.0.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

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

phantomkit-0.1.0-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file phantomkit-0.1.0.tar.gz.

File metadata

  • Download URL: phantomkit-0.1.0.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for phantomkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e9a0bcdfa7866725991f944f7db1f608d3e544c92e4c320df173c2b726905abb
MD5 e44f1b1ef73db7412f1e5ded775df301
BLAKE2b-256 0a6efc276ddef5348329e47ecaf7c3ca7fe4bec9f3bf4fa76f785c17472df337

See more details on using hashes here.

File details

Details for the file phantomkit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: phantomkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for phantomkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69e93e0d355124abeb6916f9d4e48206533d55bb3efcbf42cdbc2803f56156ae
MD5 1eda9c09218116690fc62004552c0f0e
BLAKE2b-256 9bf75c474bd293fcf62a26c49b3e5e7d679ec7f1f6947477ffe6efaf0e554f03

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