Skip to main content

Python library for calculating Standardized Uptake Value (SUV) from PET DICOM images

Project description

pySUV

A Python library for calculating Standardized Uptake Value (SUV) from PET DICOM images.

Table of Contents

Why pySUV?

SUV calculation is essential for PET image analysis, whether for traditional clinical reading (PERCIST criteria, Deauville score) or machine learning pipelines (radiomic features, preprocessing). Yet no simple, validated Python library exists.

Alternative Strength Limitation
3D Slicer Complete, multi-vendor Heavy dependency (~500 MB), GUI-oriented, hard to script
Z-Rad Excellent, validated (arXiv:2410.13348) Broad scope (full radiomics + GUI), many dependencies
ACRCode Vendor-neutral, lightweight Incomplete implementation (edge cases)
GitHub snippets Simple Unvalidated, BQML-only

pySUV provides a focused, validated solution: one function call, multi-vendor support, < 1% error vs QIBA reference. Beyond accurate calculations, it validates DICOM metadata against clinical guidelines—catching data entry errors and protocol deviations before they affect your results.

Features

  • Validated: Cross-validated against QIBA DRO (< 1% error)
  • Multi-vendor: Siemens, GE, Philips (BQML and CNTS units)
  • Four normalizations: SUVbw, SUVlbm, SUVbsa, SUVibw
  • Simple API: Compute SUV arrays or get conversion factors
  • Clinical validation: Optional module for protocol compliance checks

Installation

pip install pysuv

Quick Start

import pysuv

# Calculate SUV from a PET DICOM file
suv = pysuv.compute_suv("pet.dcm")
print(f"SUVmax: {suv.max():.2f}")

# Use different normalizations
suv_lbm = pysuv.compute_suv("pet.dcm", normalization="lbm")
suv_bsa = pysuv.compute_suv("pet.dcm", normalization="bsa")

Documentation

API Reference

compute_suv(source, normalization='bw')

Compute SUV array from a PET DICOM image.

  • source: Path to DICOM file or pydicom Dataset
  • normalization: 'bw' (default), 'lbm', 'bsa', or 'ibw'

Returns a numpy array of SUV values (same shape as input image).

get_suv_factor(source, normalization='bw')

Get the SUV conversion factor without computing the full array. Useful for applying to ROIs or storing for reproducibility.

import pydicom
import pysuv

factor = pysuv.get_suv_factor("pet.dcm")

# Apply to pixel data (works for all vendors)
ds = pydicom.dcmread("pet.dcm")
scaled = ds.pixel_array * factor.rescale_slope + factor.rescale_intercept
suv = scaled * factor.suv_factor

get_suv_parameters(source)

Inspect the parameters used for SUV calculation.

info = pysuv.get_suv_parameters("pet.dcm")
print(info)
# SUV Parameters:
#   Manufacturer: SIEMENS
#   Injected dose: 370.0 MBq
#   Patient weight: 70.0 kg
#   Half-life: 109.77 min
#   Elapsed time: 60.0 min

Normalizations

Type Description Required fields
bw Body weight (default) weight
lbm Lean body mass weight, height, sex
bsa Body surface area weight, height
ibw Ideal body weight weight, height, sex

Validation

pySUV is validated against:

  • QIBA DRO: Digital Reference Object with known SUV values
  • Reference implementations: Z-Rad, ACRCode, 3D Slicer

References

Disclaimer

For research use only. This software is not intended for clinical decision-making or diagnostic purposes. It has not been cleared or approved by any regulatory agency.

The authors provide this software "as is" without warranty of any kind. In no event shall the authors be liable for any claim, damages, or other liability arising from the use of this software.

Users are responsible for validating results against their institution's reference standards before use in any research or clinical context.

License

MIT

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

pysuv-0.1.0.tar.gz (8.4 MB view details)

Uploaded Source

Built Distribution

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

pysuv-0.1.0-py3-none-any.whl (51.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysuv-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pysuv-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b5e396880835e939cf19561825f0bc4e9a2f205820b94daedc2b95881b77f055
MD5 3a18dfc9606182464c99f55120dcb3ec
BLAKE2b-256 223becc688ec0f94224d4a63d9088f6660c73c6ab49d529b06daf13bcde81ef1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysuv-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 51.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pysuv-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ae700f5e241ed401f4de9bff44cf9af426f17b9ab5cb102d29c6c76c5e5c3ea
MD5 26c363993b51c51f3a71faba34420b2c
BLAKE2b-256 86df205453242bf72d9c75f4df3526897376dbc6890c23534df59854ea2a0529

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