qMRinfo('inversion_recovery'); % Describe the model
Model = inversion_recovery;
The current
Model
is an instance ofinversion_recovery
class.
You can manually download the sample data for inversion_recovery
by clicking here.
dataDir = downloadData(Model,pwd);
Protocol is set according to the example data
% |- inversion_recovery object needs 2 protocol field(s) to be assigned: % |- IRData % |- TimingTable
TI = [350.0000; 500.0000; 650.0000; 800.0000; 950.0000; 1100.0000; 1250.0000; 1400.0000; 1700.0000];
% TI(ms) is a vector of [9X1]
Model.Prot.IRData.Mat = [ TI];
%%
TR = 2500;
Model.Prot.TimingTable.Mat = [ TR];
%%
% IRData.mat contains [128 128 1 9] data.
load('inversion_recovery_data/IRData.mat');
% Mask.mat contains [128 128] data.
load('inversion_recovery_data/Mask.mat');
data.IRData= double(IRData);
data.Mask= double(Mask);
This section will fit data.
FitResults = FitData(data,Model,0);
- Output map will be displayed.
- If available, a graph will be displayed to show fitting in a voxel.
qMRshowOutput(FitResults,data,Model);
- 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
- These objects can be easily shared or be used for simulation.
FitResultsSave_nii(FitResults);
x = struct;
x.T1 = 600;
x.rb = -1000;
x.ra = 500;
% Set simulation options
Opt.SNR = 50;
Opt.T1 = 600;
Opt.M0 = 1000;
Opt.TR = 3000;
Opt.FAinv = 180;
Opt.FAexcite = 90;
Opt.Updateinputvariables = false;
% run simulation
figure('Name','Single Voxel Curve Simulation');
FitResult = Model.Sim_Single_Voxel_Curve(x,Opt);
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
% T1 rb ra
OptTable.st = [6e+02 -1e+03 5e+02]; % nominal values
OptTable.fx = [0 1 1]; %vary T1...
OptTable.lb = [0.0001 -1e+04 0.0001]; %...from 0.0001
OptTable.ub = [5e+03 0 1e+04]; %...to 5000
Opt.SNR = 50;
Opt.Nofrun = 5;
% run simulation
SimResults = Model.Sim_Sensitivity_Analysis(OptTable,Opt);
figure('Name','Sensitivity Analysis');
SimVaryPlot(SimResults, 'T1' ,'T1' );