Skip to main content
https://img.shields.io/badge/License-Apache_2.0-blue.svg

Model-driven motion correction for medical imaging

Installation

pip install mdreg

Typical usage

import mdreg

# Get some test data (variable flip angle MRI)
data = mdreg.fetch('VFA')

# Configure the signal model fit
fit_image = {
    'func': mdreg.fit_spgr_vfa_lin,     # VFA signal model
    'FA': data['FA'],               # Flip angle in degress
    'progress_bar': True,           # Show a progress bar
}

# Configure the coregistration method
fit_coreg = {
    'package': 'elastix',
    'spacing': data['spacing'],
}

# Perform the motion correction
coreg, defo, fit, pars = mdreg.fit(
    data['array'],                # Signal data to correct
    fit_image = fit_image,        # Signal model fit
    fit_coreg = fit_coreg,        # Coregistration
    verbose = 2,                  # Show progress update
)

# Visualize the results
anim = mdreg.plot.animation(
    coreg,
    title = 'Motion corrected VFA',
    'interval' : 500,                   # Time between animation frames in ms
    'vmin' : 0,                         # Minimum value of the colorbar
    'vmax' : np.percentile(coreg, 99),  # Maximum value of the colorbar
)
https://qib-sheffield.github.io/mdreg/_images/sphx_glr_plot_3Dexample_vfa_002.gif

License

Released under the Apache 2.0 license:

Copyright (C) 2023-2024 dcmri developers

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdreg-0.5.4.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

mdreg-0.5.4-py3-none-any.whl (1.7 MB view details)

Uploaded Python 3

File details

Details for the file mdreg-0.5.4.tar.gz.

File metadata

  • Download URL: mdreg-0.5.4.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for mdreg-0.5.4.tar.gz
Algorithm Hash digest
SHA256 a8647a37fa8d2bba091f99663f3dfbe34d84823644cc8ddf3606376da2e3f22c
MD5 7c3e29ac227acb9e645f071d95ed3016
BLAKE2b-256 488498b5a5e18d42732535be5fb59f5267fd6b17947e84f4b25fddb1b75e7173

See more details on using hashes here.

File details

Details for the file mdreg-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: mdreg-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for mdreg-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8e47f908122b51c30c863d201d3197ffb60670cf5dc4e1b76ec216f46b2468ea
MD5 421451d9a79b06eb15acb9aa50dfd751
BLAKE2b-256 baea3fcaf658e19364a1739e9f5dc60976d47e1e39c0bcd2a5e9f94f82ce1790

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.4 This release

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page