"Myelin and Relaxation" (MyRelax) is a collection of command line scripts written in Python 3 for myelin and relaxometry MRI. MyRelax was developed as part of the CDS-QuaMRI project, funded under the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 634541.
MyRelax tools process MRI scans in NIFTI format, as well as other MRI sequence parameters that are passed in the form of text files. These can be readily obtained from DICOM fields or from the JSON files associated to NIFTIs according to the Brain Imaging Data Structure (BIDS).
Here you can find MyRelax releases. The latest release is 1.0.0, available as a Zenodo repository (doi: 10.5281/zenodo.4561898).
To run MyRelax you need a Python 3 distribution such as Anaconda. Additionally, you need the following third party modules/packages:
Getting MyRelax is extremely easy: cloning this repository is all you need to do.
If you use Linux or MacOs:
- Open a terminal;
- Navigate to your destination folder;
- Clone MyRelax:
git clone https://github.com/fragrussu/MyRelax.git
- MyRelax is ready for you in
./MyRelax
and MyRelax scripts are in:
./MyRelax/myrelax
- You should now be able to use the code. Try to print the manual of a script, for instance of
getMTV.py
, to make sure this is really the case:
python ./MyRelax/myrelax/getMTV.py --help
The following command line scripts are available within the myrelax
folder.
getB1AFI.py
: to calculate a B1 map with the Actual Flip Angle Imaging method;getB1DAGE.py
: to calculate a B1 map with the Double Angle method (gradient echo readout);getB1DASE.py
: to calculate a B1 map with the Double Angle method (spin echo readout);getGratio.py
: to calculate a weighted g-ratio map combining indices of myelin and axonal fraction;getJSONField.py
: to extract the value of a field of interest from a JSON file (this command is useful to create text files storing TR, TE, flip angles, etc that can be passed to other MyRelax fitting routines);getMTR.py
: to calculate the magnetisation transfer ratio;getMTV.py
: to calculate the macromolecular tissue volume with the method of the pseudo-proton densities;getT1IR.py
: to fit a mono-exponential inversion recovery model to magnitude MRI data for T1 estimation;getT1VTR.py
: to fit a mono-exponential variable spin echo repetition time model to magnitude MRI data for T1 estimation;getT1VFA.py
: to fit a mono-exponential variable flip angle model to magnitude MRI data for T1 estimation;getT2Prime.py
: to calculate T2' from T2 and T2*;getT2T2star.py
: to fit a mono-exponential decay model to magnitude MRI data for T2 or T2* estimation;getT2T2starBiexp.py
: to fit a bi-exponential decay model to magnitude MRI data, obtaining estimates of 2 distinct T2 (or T2*) constants and of their relative signal fractions;getPDT2T1TurboSpinEcho.py
: to estimate quantitative proton density, T1 and T2 from 3 spin echo scans performed at two different TEs and one different TR - see Ricciardi A, Grussu F et al, Proceedings of ISMRM 2018, p. 2846.
You can run MyRelax scripts from command line, for instance using a Bash or C shell. Some scripts support multi-core analyses (option --ncpu
; no GPU at the moment though). Importantly, each tool has a manual: to print it, simply type in your terminal
python </PATH/TO/SCRIPT> --help
(for example, python ./MyRelax/myrelax/getMTR.py --help
).
If you use MyRelax in your research, please remember to cite our paper:
"Multi-parametric quantitative in vivo spinal cord MRI with unified signal readout and image denoising". Grussu F, Battiston M, Veraart J, Schneider T, Cohen-Adad J, Shepherd TM, Alexander DC, Fieremans E, Novikov DS, Gandini Wheeler-Kingshott CAM; NeuroImage 2020, 217: 116884 (DOI: 10.1016/j.neuroimage.2020.116884).
MyRelax is distributed under the BSD 2-Clause License, Copyright (c) 2019 and 2020, University College London. All rights reserved. Link to license here.
The use of MyRelax MUST also comply with the individual licenses of all of its dependencies.
The development of MyRelax was enabled by the CDS-QuaMRI project, funded under the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 634541. Support from the United Kingdom Engineering and Physical Sciences Research Council (EPSRC R006032/1 and M020533/1) is also acknowledged.