Python bindings for the GeometricMedicalPhantoms shared library — synthetic MRI/CT phantoms (Shepp-Logan, Tubes, Torso) with physiological motion signals
Project description
geometric-medical-phantoms
Python bindings for the GeometricMedicalPhantoms shared library — a Julia-based toolkit for generating synthetic MRI/CT phantoms.
Supported phantoms
- Shepp-Logan — classic ellipsoid head phantom (CT and MRI variants)
- Tubes — cylindrical quality-control phantom
- Torso — anatomically-motivated torso with respiratory and cardiac motion
Requirements
- Python ≥ 3.9
- NumPy ≥ 1.20
- The pre-built
libgeomphantomsshared library (see Releases)
Installation
pip install geometric-medical-phantoms
Then download the pre-built library bundle for your platform from the GitHub Releases page and extract it.
Quick start
from geometric_medical_phantoms import GMPLib
lib = GMPLib("/path/to/build/lib/libgeomphantoms.so") # .dylib / .dll on other platforms
# Shepp-Logan 3-D phantom
ti = lib.shepp_logan_ct_default()
phantom = lib.create_shepp_logan_phantom_3d(128, 128, 128, ti)
# phantom is a (128, 128, 128) float32 numpy array in Fortran (column-major) order
# Respiratory signal
phys = lib.respiratory_physiology_default()
t, sig = lib.generate_respiratory_signal(60.0, 50.0, 15.0, phys)
# Dynamic torso phantom (4-D cine)
torso = lib.create_torso_phantom_3d(64, 64, 64, resp_signal=sig[:50])
# torso.shape == (64, 64, 64, 50)
Documentation
Full API reference and usage guides are available at https://hakkelt.github.io/GeometricMedicalPhantoms.jl.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file geometric_medical_phantoms-1.0.2.tar.gz.
File metadata
- Download URL: geometric_medical_phantoms-1.0.2.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
290ce956b2c6251a9fdef6575a33db70b38b4e452afbd6fe15cb5130d9649d5d
|
|
| MD5 |
914360ad147c01428b711956062c3881
|
|
| BLAKE2b-256 |
a4886b1d30b167789edb55ea33f088ff03c1ff64e65d7ebfc317aa0a1b0d451e
|
Provenance
The following attestation bundles were made for geometric_medical_phantoms-1.0.2.tar.gz:
Publisher:
build-lib.yml on hakkelt/GeometricMedicalPhantoms.jl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
geometric_medical_phantoms-1.0.2.tar.gz -
Subject digest:
290ce956b2c6251a9fdef6575a33db70b38b4e452afbd6fe15cb5130d9649d5d - Sigstore transparency entry: 1563184705
- Sigstore integration time:
-
Permalink:
hakkelt/GeometricMedicalPhantoms.jl@cc483645dcf4f3bbac9ede031307387505e69b3b -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/hakkelt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-lib.yml@cc483645dcf4f3bbac9ede031307387505e69b3b -
Trigger Event:
push
-
Statement type: