Model-driven image registration
Project description
Model-driven motion correction for medical imaging
Documentation: https://openmiblab.github.io/mdreg
Source code: https://github.com/openmiblab/mdreg
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
)
License
Released under the Apache 2.0 license:
Copyright (C) 2023-2024 dcmri developers
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
mdreg-0.5.2.tar.gz
(42.5 kB
view details)
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
mdreg-0.5.2-py3-none-any.whl
(44.0 kB
view details)
File details
Details for the file mdreg-0.5.2.tar.gz.
File metadata
- Download URL: mdreg-0.5.2.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86bbed68a108ad0459a85765bdabf225463b405ef92c8b6bf9f92404025dffa4
|
|
| MD5 |
5f19200e3a915f245217d0ffec3c2b16
|
|
| BLAKE2b-256 |
a8c311474185db3f48997d34943f286c019202bd7f1d55f94eeb6d023e0a30cd
|
File details
Details for the file mdreg-0.5.2-py3-none-any.whl.
File metadata
- Download URL: mdreg-0.5.2-py3-none-any.whl
- Upload date:
- Size: 44.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38964cb7d8ab90aede6b08145e21fa875fd729971aeb86328acf7fafc30306da
|
|
| MD5 |
e7db5ac8aa69ec189a7a818226ec487d
|
|
| BLAKE2b-256 |
dd8d12d654f3d398ca66bfc036c1e4bfffba132314e1436e73955a28d2d56deb
|