Digital Reference Objects for quantitative MRI validation
Project description
qmri-dro
Digital Reference Objects (DROs) for quantitative MRI validation.
Overview
qmri-dro provides tools for generating synthetic MRI data with known ground
truth parameters. This is essential for:
- Validation: Test fitting algorithms against known ground truth
- Education: Demonstrate how MRI parameters affect signal
- Benchmarking: Compare fitting methods (e.g., LLS vs WLLS vs IWLLS)
- Testing: Reproducible synthetic data for unit tests
- Sensitivity analysis: Study noise/parameter effects on results
Installation
pip install qmri-dro
Or with uv:
uv add qmri-dro
Quick Start
DWI Phantom
from qmri.dro import dwi
from qmri.diffusion import adc
# Generate a phantom with known ADC
phantom = dwi.generate(adc=1e-3, s0=1000, snr=50, seed=42)
# Fit and compare to ground truth
result = adc.fit(phantom.signal, phantom.b_values)
print(f"True ADC: {phantom.ground_truth['adc'].value:.2e}")
print(f"Fitted ADC: {result.adc:.2e}")
T1 Phantom
from qmri.dro import relaxometry
from qmri.relaxometry import t1
# Generate IR data with known T1
phantom = relaxometry.generate_t1_ir(
t1=1.2,
inversion_times=[0.1, 0.5, 1.0, 2.0, 3.0],
repetition_time=5.0,
snr=100,
seed=42,
)
# Fit and validate
result = t1.fit_ir(phantom.signal, phantom.time_points, repetition_times=5.0)
print(f"True T1: {phantom.ground_truth['t1'].value:.2f} s")
print(f"Fitted T1: {float(result.t1):.2f} s")
ASL Phantom
from qmri.dro import perfusion
# Generate pCASL data with known perfusion
phantom = perfusion.generate_pcasl(
perfusion_rate=60.0, # ml/100g/min
m0=1000.0,
transit_time=1.0,
snr=50,
seed=42,
)
# Access the difference signal
delta_m = phantom.control - phantom.label
print(f"True CBF: {phantom.ground_truth['perfusion_rate'].value} ml/100g/min")
Features
- Noise models: Gaussian and Rician noise with reproducible seeding
- Ground truth tracking: All phantoms include documented ground truth values
- Multi-voxel support: Generate single voxels or calibration phantoms
- Calibration phantoms: Pre-configured phantoms for standardised testing
Documentation
Full documentation: https://gold-standard-phantoms.github.io/qmri
Licence
MIT
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
qmri_dro-0.1.0-py3-none-any.whl
(12.5 kB
view details)
File details
Details for the file qmri_dro-0.1.0-py3-none-any.whl.
File metadata
- Download URL: qmri_dro-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc644fe42a33adeb574ee1f3e9fba7ff062f3223503ee08b896fb73f7049724f
|
|
| MD5 |
0b2bdb27e4c2610d5700309c2cc9d81d
|
|
| BLAKE2b-256 |
aa4aff8530cfce7e171c4608359b907461f10623a63644a12088576e4ed1c1dc
|