-
Notifications
You must be signed in to change notification settings - Fork 1
/
multiexpo_T2_image.m
26 lines (21 loc) · 1.19 KB
/
multiexpo_T2_image.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
% Define the model
Model = mwf;
% Load data into environment, and rotate mask to be aligned with IR data
data = struct;
load('example_data/mwf_demo/mwf_data/MET2data.mat');
load('example_data/mwf_demo/mwf_data/Mask.mat');
data.MET2data = double(MET2data);
data.Mask = double(Mask);
% Define fitting parameters
EchoTime = [12.8000; 25.6000; 38.4000; 51.2000; 64.0000; 76.8000; 89.6000; 102.4000; 115.2000; 128.0000; 140.8000; 153.6000; 166.4000; 179.2000; 192.0000; 204.8000; 217.6000; 230.4000; 243.2000; 256.0000; 268.8000; 281.6000; 294.4000; 307.2000; 320.0000; 332.8000; 345.6000; 358.4000; 371.2000; 384.0000];
Model.Prot.SEdata.Mat = [ EchoTime ];
% MET2w MRI data at different TE values
ME_TE_1 = imrotate(squeeze(data.MET2data(:,:,:,1).*data.Mask),-90);
ME_TE_2 = imrotate(squeeze(data.MET2data(:,:,:,10).*data.Mask),-90);
ME_TE_3 = imrotate(squeeze(data.MET2data(:,:,:,20).*data.Mask),-90);
ME_TE_4 = imrotate(squeeze(data.MET2data(:,:,:,30).*data.Mask),-90);
% Fit the data
FitResults_mwf = FitData(data,Model,0);
MWF = imrotate(squeeze(FitResults_mwf.MWF.*data.Mask), -90);
T2MW = imrotate(squeeze(FitResults_mwf.T2MW.*data.Mask), -90);
T2IEW = imrotate(squeeze(FitResults_mwf.T2IEW.*data.Mask), -90);