-
Notifications
You must be signed in to change notification settings - Fork 5
/
run_results.m
42 lines (36 loc) · 1.44 KB
/
run_results.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
clear
close all
s=load('output_data.mat');
s.test_pd = permute(s.test_pd,[2 3 1 4]);
s.test_gt = permute(s.test_gt,[2 3 1 4]);
water_abs_pd = s.test_pd(:,:,:,1)*s.w_std_r+s.w_mean_r;
fat_abs_pd = s.test_pd(:,:,:,2)*s.f_std_r+s.f_mean_r;
water_phs_pd = s.test_pd(:,:,:,4)*s.w_std_i+s.w_mean_i;
fat_phs_pd = s.test_pd(:,:,:,5)*s.f_std_i+s.f_mean_i;
field_pd = s.test_pd(:,:,:,6)*s.frq_std+s.frq_mean;
r2s_pd = s.test_pd(:,:,:,3)*s.r2_std+s.r2_mean;
water_abs_gt = s.test_gt(:,:,:,1)*s.w_std_r+s.w_mean_r;
fat_abs_gt = s.test_gt(:,:,:,2)*s.f_std_r+s.f_mean_r;
water_phs_gt = s.test_gt(:,:,:,3)*s.w_std_i+s.w_mean_i;
fat_phs_gt = s.test_gt(:,:,:,4)*s.f_std_i+s.f_mean_i;
field_gt = s.test_gt(:,:,:,5)*s.frq_std+s.frq_mean;
r2s_gt = s.test_gt(:,:,:,6)*s.r2_std+s.r2_mean;
mask = permute(s.mask,[2 3 1]);
pd = cat(4,water_abs_pd.*mask,fat_abs_pd.*mask,water_phs_pd.*mask,fat_phs_pd.*mask,field_pd.*mask,r2s_pd.*mask);
gt = cat(4,water_abs_gt.*mask,fat_abs_gt.*mask,water_phs_gt.*mask,fat_phs_gt.*mask,field_gt.*mask,r2s_gt.*mask);
slc = 22;
figure;
subplot(221)
imshow([abs(gt(:,:,slc,1)) abs(pd(:,:,slc,1))])
title('Water (Reference vs NTD)')
subplot(222)
imshow([abs(gt(:,:,slc,2)) abs(pd(:,:,slc,2))])
title('Fat (Reference vs NTD)')
subplot(223)
imshow([gt(:,:,slc,5) pd(:,:,slc,5)])
caxis([-50 100])
title('Field (Reference vs NTD)')
subplot(224)
imshow([gt(:,:,slc,6) pd(:,:,slc,6)])
caxis([0 200])
title('R2* (Reference vs NTD)')