b0_dem map : Dual Echo Method for B0 mappingΒΆ

https://mybinder.org/badge_logo.svg

Contents

% This m-file has been automatically generated using qMRgenBatch(b0_dem)
% Command Line Interface (CLI) is well-suited for automatization
% purposes and Octave.
%
% Please execute this m-file section by section to get familiar with batch
% processing for b0_dem on CLI.
%
% Demo files are downloaded into b0_dem_data folder.
%
% Written by: Agah Karakuzu, 2017
% =========================================================================

I- DESCRIPTION

qMRinfo('b0_dem'); % Describe the model
  b0_dem map :  Dual Echo Method for B0 mapping

Assumptions:
Compute B0 map based on 2 phase images with different TEs

Inputs:
Phase       4D phase image, 2 different TEs in time dimension
Magn        3D magnitude image

Outputs:
B0map       B0 field map [Hz]

Protocol:
TimingTable
deltaTE     Difference in TE between 2 images [ms]

Options:
Magn thresh     relative threshold for the magnitude (phase is undefined in the background

Example of command line usage:
Model = b0_dem;  % Create class from model
Model.Prot.TimingTable.Mat = 1.92e-3; % deltaTE [s]
data.Phase = double(load_nii_data('Phase.nii.gz'));%Load 4D data, 2 frames with different TE
data.Magn  = double(load_nii_data('Magn.nii.gz'));
FitResults       = FitData(data,Model);
FitResultsSave_nii(FitResults,'Phase.nii.gz'); %save nii file using Phase.nii.gz as template

For more examples: a href="matlab: qMRusage(b0_dem);"qMRusage(b0_dem)/a

Author: Ian Gagnon, 2017

References:
Please cite the following if you use this module:
Maier, F., Fuentes, D., Weinberg, J.S., Hazle, J.D., Stafford, R.J.,
2015. Robust phase unwrapping for MR temperature imaging using a
magnitude-sorted list, multi-clustering algorithm. Magn. Reson. Med.
73, 1662?1668. Schofield, M.A., Zhu, Y., 2003. Fast phase unwrapping
algorithm for interferometric applications. Opt. Lett. 28, 1194?1196
In addition to citing the package:
Cabana J-F, Gu Y, Boudreau M, Levesque IR, Atchia Y, Sled JG,
Narayanan S, Arnold DL, Pike GB, Cohen-Adad J, Duval T, Vuong M-T and
Stikov N. (2016), Quantitative magnetization transfer imaging made
easy with qMTLab: Software for data simulation, analysis, and
visualization. Concepts Magn. Reson.. doi: 10.1002/cmr.a.21357

Reference page in Doc Center
doc b0_dem


II- MODEL PARAMETERS

a- create object

Model = b0_dem;

b- modify options

         |- This section will pop-up the options GUI. Close window to continue.
|- Octave is not GUI compatible. Modify Model.options directly.
Model = Custom_OptionsGUI(Model); % You need to close GUI to move on.

III- FIT EXPERIMENTAL DATASET

a- load experimental data

         |- b0_dem object needs 2 data input(s) to be assigned:
|-   Phase
|-   Magn
data = struct();
% Phase.nii.gz contains [64  64   1   8] data.
data.Phase=double(load_nii_data('b0_dem_data/Phase.nii.gz'));
% Magn.nii.gz contains [64  64   1   8] data.
data.Magn=double(load_nii_data('b0_dem_data/Magn.nii.gz'));

b- fit dataset

           |- This section will fit data.
FitResults = FitData(data,Model,0);
...done

c- show fitting results

         |- Output map will be displayed.
|- If available, a graph will be displayed to show fitting in a voxel.
|- To make documentation generation and our CI tests faster for this model,
we used a subportion of the data (40X40X40) in our testing environment.
|- Therefore, this example will use FitResults that comes with OSF data for display purposes.
|- Users will get the whole dataset (384X336X224) and the script that uses it for demo
via qMRgenBatch(qsm_sb) command.
FitResults_old = load('FitResults/FitResults.mat');
qMRshowOutput(FitResults_old,data,Model);

d- Save results

         |-  qMR maps are saved in NIFTI and in a structure FitResults.mat
that can be loaded in qMRLab graphical user interface
|-  Model object stores all the options and protocol.
It can be easily shared with collaborators to fit their
own data or can be used for simulation.
FitResultsSave_nii(FitResults, 'b0_dem_data/Phase.nii.gz');
Model.saveObj('b0_dem_Demo.qmrlab.mat');
Warning: Directory already exists.

V- SIMULATIONS

   |- This section can be executed to run simulations for b0_dem.

a- Single Voxel Curve

         |- Simulates Single Voxel curves:
(1) use equation to generate synthetic MRI data
(2) add rician noise
(3) fit and plot curve
% Not available for the current model.

b- Sensitivity Analysis

         |-    Simulates sensitivity to fitted parameters:
(1) vary fitting parameters from lower (lb) to upper (ub) bound.
(2) run Sim_Single_Voxel_Curve Nofruns times
(3) Compute mean and std across runs
% Not available for the current model.