b1_dam map: Double-Angle Method for B1+ mappingĀ¶



% This m-file has been automatically generated using qMRgenBatch(b1_dam)
% 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 b1_dam on CLI.
% Demo files are downloaded into b1_dam_data folder.
% Written by: Agah Karakuzu, 2017
% =========================================================================


qMRinfo('b1_dam'); % Describe the model
  b1_dam map:  Double-Angle Method for B1+ mapping

Compute a B1map using 2 SPGR images with 2 different flip angles (alpha, 2xalpha)
Smoothing can be done with different filters and optional size
Spurious B1 values and those outside the mask (optional) are set to a constant before smoothing

SFalpha            SPGR data at a flip angle of Alpha degree
SF2alpha           SPGR data at a flip angle of AlphaX2 degree
(Mask)             Binary mask to exclude non-brain voxels (better when smoothing)

B1map_raw          Excitation (B1+) field map
B1map_filtered     Smoothed B1+ field map using Gaussian, Median, Spline or polynomial filter (see FilterClass.m for more info)
Spurious           Map of datapoints that were set to 1 prior to smoothing


(inherited from FilterClass)

Example of command line usage:
Model = b1_dam;% Create class from model
data.SFalpha = double(load_nii_data('SFalpha.nii.gz')); %load data
data.SF2alpha  = double(load_nii_data('SF2alpha.nii.gz'));
Model.Smoothingfilter_Type = 'gaussian'; %apply gaussian smoothing in 3D with fwhm=3
Model.Smoothingfilter_Type = '3D';
Model.Smoothingfilter_sizex = 3;
Model.Smoothingfilter_sizey = 3;
Model.Smoothingfilter_sizez = 3;
FitResults       = FitData(data,Model); % fit data
FitResultsSave_nii(FitResults,'SFalpha.nii.gz'); %save nii file using SFalpha.nii.gz as template

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

Author: Ian Gagnon, 2017

Please cite the following if you use this module:
Insko, E.K., Bolinger, L., 1993. Mapping of the Radiofrequency Field.
J. Magn. Reson. A 103, 82?85.
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 b1_dam


a- create object

Model = b1_dam;

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.


a- load experimental data

         |- b1_dam object needs 3 data input(s) to be assigned:
|-   SFalpha
|-   SF2alpha
|-   Mask
data = struct();
% SFalpha.nii.gz contains [64  64] data.
% SF2alpha.nii.gz contains [64  64] data.

b- fit dataset

           |- This section will fit data.
FitResults = FitData(data,Model,0);
=============== qMRLab::Fit ======================
Operation has been started: b1_dam
Elapsed time is 0.043212 seconds.
Operation has been completed: b1_dam

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');

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, 'b1_dam_data/SFalpha.nii.gz');
Warning: Directory already exists.


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

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.