qMRinfo('mwf'); % Describe the model
Model = mwf;
The current
Model
is an instance ofmwf
class.
You can manually download the sample data for mwf
by clicking here.
dataDir = downloadData(Model,pwd);
Protocol is set according to the example data
% |- mwf object needs 1 protocol field(s) to be assigned: % |- MET2data
EchoTime = [10.0000; 20.0000; 30.0000; 40.0000; 50.0000; 60.0000; 70.0000; 80.0000; 90.0000; 100.0000; 110.0000; 120.0000; 130.0000; 140.0000; 150.0000; 160.0000; 170.0000; 180.0000; 190.0000; 200.0000; 210.0000; 220.0000; 230.0000; 240.0000; 250.0000; 260.0000; 270.0000; 280.0000; 290.0000; 300.0000; 310.0000; 320.0000];
% EchoTime (ms) is a vector of [32X1]
Model.Prot.MET2data.Mat = [ EchoTime ];
%%
% MET2data.mat contains [64 64 1 32] data.
load('mwf_data/MET2data.mat');
% Mask.mat contains [64 64] data.
load('mwf_data/Mask.mat');
data.MET2data= double(MET2data);
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.MWF = 50.0001;
x.T2MW = 20.0001;
x.T2IEW = 120;
% Set simulation options
Opt.SNR = 200;
Opt.T2Spectrumvariance_Myelin = 5;
Opt.T2Spectrumvariance_IEIntraExtracellularWater = 20;
% 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
% MWF T2MW T2IEW
OptTable.st = [50 20 1.2e+02]; % nominal values
OptTable.fx = [0 1 1]; %vary MWF...
OptTable.lb = [0.0001 0.0001 40]; %...from 0.0001
OptTable.ub = [1e+02 40 2e+02]; %...to 100
% Set simulation options
Opt.SNR = 200;
Opt.T2Spectrumvariance_Myelin = 5;
Opt.T2Spectrumvariance_IEIntraExtracellularWater = 20;
Opt.Nofrun = 5;
% run simulation
SimResults = Model.Sim_Sensitivity_Analysis(OptTable,Opt);
figure('Name','Sensitivity Analysis');
SimVaryPlot(SimResults, 'MWF' ,'MWF' );