Skip to main content

Model-driven image registration

Project description

https://img.shields.io/badge/License-Apache_2.0-blue.svg

Model-driven motion correction for medical imaging

Note: mdreg is under construction. At this stage, the API may still change and features may be deprecated without warning.

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.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.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

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

mdreg-0.4.3.tar.gz (4.9 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.4.3-py3-none-any.whl (5.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mdreg-0.4.3.tar.gz
  • Upload date:
  • Size: 4.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.10

File hashes

Hashes for mdreg-0.4.3.tar.gz
Algorithm Hash digest
SHA256 560b119fb4eb66a7bcd77bdccc8f5c7f8c4dc7e58ae9c5566fdfffe6c839b675
MD5 6dd1e37621122ebda769cc2b9929e8d0
BLAKE2b-256 9f23b527c1d55bb86c619985e06f379255cec5f431433ae8867519de38f05bcd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdreg-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.10

File hashes

Hashes for mdreg-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bca5062e706860b7a430eecd98f8f7e06c82346c43c6de8167897e10e2fa0566
MD5 6833ffc20bd12a178574d016e8c5de3f
BLAKE2b-256 32bcbcbfea90cda69b9162129d9413cb53898e586838b52a1e4d0f53779154fb

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