Skip to content

Commit

Permalink
Merge pull request #61 from plaresmedima/development
Browse files Browse the repository at this point in the history
Bug fixes, model corrections and doc updates
  • Loading branch information
plaresmedima authored Dec 5, 2024
2 parents dad40b6 + ac9bb77 commit aa3dd3c
Show file tree
Hide file tree
Showing 82 changed files with 404,878 additions and 299,929 deletions.
6 changes: 0 additions & 6 deletions README.md

This file was deleted.

79 changes: 79 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
mdreg
=====

.. image:: https://img.shields.io/badge/License-Apache_2.0-blue.svg
:target: https://opensource.org/licenses/Apache-2.0



Model-driven motion correction for medical imaging
--------------------------------------------------

- **Documentation:** https://qib-sheffield.github.io/mdreg/
- **Source code:** https://github.com/QIB-Sheffield/mdreg


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


Installation
------------

.. code-block:: console
pip install mdreg
Typical usage
-------------

.. code-block:: python
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
)
.. image:: https://qib-sheffield.github.io/mdreg/_images/sphx_glr_plot_3Dexample_vfa_002.gif
:width: 800


License
-------

Released under the `Apache 2.0 <https://opensource.org/licenses/Apache-2.0>`_
license::

Copyright (C) 2023-2024 dcmri developers
1 change: 1 addition & 0 deletions dev/sops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ To make all autogenerated documentation from scratch, first delete all auto-gene

Building release notes
----------------------

- Get a personal token on https://github.com/settings/tokens (does not need any permissions)
- Save the token in the environment variable GH_TOKEN. On windows:
>>> $env:GH_TOKEN='token'
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Examples

.. note::

`mdreg` is developed in public but is work in progress. As long as this notice is visible, backwards compatibility is not guaranteed and features may be deprecated without warning.
``mdreg`` is under construction. At this stage, the API may still change and
features may be deprecated without warning.
1 change: 0 additions & 1 deletion docs/examples/tutorials/plot_getting_started_defo.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
molli = {
'func': mdreg.abs_exp_recovery_2p,
'TI': np.array(data['TI'])/1000,
'progress_bar': True,
}

# Perform model-driven coregistration
Expand Down
273 changes: 0 additions & 273 deletions docs/examples/use_cases/_plot_poor_model_fitting.py

This file was deleted.

Loading

0 comments on commit aa3dd3c

Please sign in to comment.