Skip to content

Latest commit

 

History

History
212 lines (195 loc) · 13 KB

qmt_bssfp_batch.rst

File metadata and controls

212 lines (195 loc) · 13 KB

qmt_bssfp : qMT using Balanced Steady State Free Precession acquisition

.content { font-size:1.0em; line-height:140%; padding: 20px; } .content p { padding:0px; margin:0px 0px 20px; } .content img { padding:0px; margin:0px 0px 20px; border:none; } .content p img, pre img, tt img, li img, h1 img, h2 img { margin-bottom:0px; } .content ul { padding:0px; margin:0px 0px 20px 23px; list-style:square; } .content ul li { padding:0px; margin:0px 0px 7px 0px; } .content ul li ul { padding:5px 0px 0px; margin:0px 0px 7px 23px; } .content ul li ol li { list-style:decimal; } .content ol { padding:0px; margin:0px 0px 20px 0px; list-style:decimal; } .content ol li { padding:0px; margin:0px 0px 7px 23px; list-style-type:decimal; } .content ol li ol { padding:5px 0px 0px; margin:0px 0px 7px 0px; } .content ol li ol li { list-style-type:lower-alpha; } .content ol li ul { padding-top:7px; } .content ol li ul li { list-style:square; } .content pre, code { font-size:11px; } .content tt { font-size: 1.0em; } .content pre { margin:0px 0px 20px; } .content pre.codeinput { padding:10px; border:1px solid #d3d3d3; background:#f7f7f7; overflow-x:scroll} .content pre.codeoutput { padding:10px 11px; margin:0px 0px 20px; color:#4c4c4c; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word -wrap: break-word;} .content pre.error { color:red; } .content @media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } } .content span.keyword { color:#0000FF } .content span.comment { color:#228B22 } .content span.string { color:#A020F0 } .content span.untermstring { color:#B20000 } .content span.syscmd { color:#B28C00 } .content .footer { width:auto; padding:10px 0px; margin:25px 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; } .content .footer p { margin:0px; } .content .footer a { color:#878787; } .content .footer a:hover { color:#878787; text-decoration:underline; } .content .footer a:visited { color:#878787; } .content table th { padding:7px 5px; text-align:left; vertical-align:middle; border: 1px solid #d6d4d4; font-weight:bold; } .content table td { padding:7px 5px; text-align:left; vertical-align:top; border:1px solid #d6d4d4; } ::-webkit-scrollbar { -webkit-appearance: none; width: 4px; height: 5px; } ::-webkit-scrollbar-thumb { border-radius: 5px; background-color: rgba(0,0,0,.5); -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5); }

Contents

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

I- DESCRIPTION

qMRinfo('qmt_bssfp'); % Describe the model
  qmt_bssfp : qMT using Balanced Steady State Free Precession acquisition
-----------------------------------------------------------------------------------------------------
Assumptions:

Inputs:
MTdata        4D Magnetization Transfer data
(R1map)       1/T1map (optional)
(Mask)        Binary mask to accelerate the fitting (optional)

Outputs:
F         Ratio of number of restricted pool to free pool, defined
as F = M0r/M0f = kf/kr.
kr        Exchange rate from the free to the restricted pool
(note that kf and kr are related to one another via the
definition of F. Changing the value of kf will change kr
accordingly, and vice versa).
R1f       Longitudinal relaxation rate of the free pool
(R1f = 1/T1f).
R1r       Longitudinal relaxation rate of the restricted pool
(R1r = 1/T1r).
T2f       Tranverse relaxation time of the free pool (T2f = 1/R2f).
M0f       Equilibrium value of the free pool longitudinal
magnetization.

Additional Outputs
M0r       Equilibrium value of the restricted pool longitudinal
magnetization.
kf        Exchange rate from the restricted to the free pool.
resnorm   Fitting residual.

Protocol:
MTdata      Array [nbVols x 2]:
Alpha   Flip angle of the RF pulses (degrees)
Trf     Duration of the RF pulses (s)

Options:
RF Pulse
Shape           Shape of the RF pulses.
Available shapes are:
- hard
- gaussian
- gausshann (gaussian pulse with Hanning window)
- sinc
- sinchann (sinc pulse with Hanning window)
- singauss (sinc pulse with gaussian window)
- fermi
Nb of RF pulses Number of RF pulses applied before readout.

Protocol Timing
Fix TR          Select this option and enter a value in the text
box below to set a fixed repetition time.
Fix TR - Trf        Select this option and enter a value in the text
box below to set a fixed free precession time
(TR - Trf).
Prepulse      Perform an Alpha/2 - TR/2 prepulse before each
series of RF pulses.

R1
Use R1map to      By checking this box, you tell the fitting
constrain R1f   algorithm to check for an observed R1map and use
its value to constrain R1f. Checking this box
will automatically set the R1f fix box to true in
the Fit parameters table.
Fix R1r = R1f     By checking this box, you tell the fitting
algorithm to fix R1r equal to R1f. Checking this
box will automatically set the R1r fix box to
true in the Fit parameters table.

Global
G(0)              The assumed value of the absorption lineshape of
the restricted pool.

References:
Please cite the following if you use this module:

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 qmt_bssfp


II- MODEL PARAMETERS

a- create object

Model = qmt_bssfp;

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

         |- qmt_bssfp object needs 3 data input(s) to be assigned:
|-   MTdata
|-   R1map
|-   Mask
data = struct();
% MTdata.nii.gz contains [128  128    1   16] data.
data.MTdata=double(load_nii_data('qmt_bssfp_data/MTdata.nii.gz'));
% R1map.nii.gz contains [128  128] data.
data.R1map=double(load_nii_data('qmt_bssfp_data/R1map.nii.gz'));
% Mask.nii.gz contains [128  128] data.
data.Mask=double(load_nii_data('qmt_bssfp_data/Mask.nii.gz'));

b- fit dataset

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

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, 'qmt_bssfp_data/MTdata.nii.gz');
Model.saveObj('qmt_bssfp_Demo.qmrlab.mat');
Warning: Directory already exists.

V- SIMULATIONS

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

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
      x = struct;
x.F = 0.1;
x.kr = 30;
x.R1f = 1;
x.R1r = 1;
x.T2f = 0.04;
x.M0f = 1;
% Set simulation options
Opt.SNR = 50;
Opt.Method = 'Analytical equation';
Opt.ResetMz = false;
% run simulation
figure('Name','Single Voxel Curve Simulation');
FitResult = Model.Sim_Single_Voxel_Curve(x,Opt);

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
      %              F             kr            R1f           R1r           T2f           M0f
OptTable.st = [0.1           30            1             1             0.04          1]; % nominal values
OptTable.fx = [0             1             1             1             1             1]; %vary F...
OptTable.lb = [0.0001        0.0001        0.2           0.2           0.01          0.0001]; %...from 0.0001
OptTable.ub = [0.3           1e+02         3             3             0.2           2]; %...to 0.3
% Set simulation options
Opt.SNR = 50;
Opt.Method = 'Analytical equation';
Opt.ResetMz = false;
Opt.Nofrun = 5;
% run simulation
SimResults = Model.Sim_Sensitivity_Analysis(OptTable,Opt);
figure('Name','Sensitivity Analysis');
SimVaryPlot(SimResults, 'F' ,'F' );


Published with MATLAB R2018a