-
Notifications
You must be signed in to change notification settings - Fork 7
/
exp_liver_wf_cs.m
97 lines (68 loc) · 1.91 KB
/
exp_liver_wf_cs.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
%% Chemical Shift
clc
clear
close all
setPath
%% Get Kspace
load liver_waterfat
[sx,sy,nc,nm,ne] = size(ksp);
ns = length(ppm);
FOV = size(ksp);
ksp = ksp/max(vec(abs(ifft2c(ksp))));
%% Subsample
ax = 2; % sub-sampling factor in x
ay = 2; % sub-sampling factor in y
ncalib = 24;
mask = vdPoisMex(sx, sy, sx, sy, ax, ay, ncalib, 1, 1.3);
mask = repmat( mask, [1,1,nc, nm, ne]);
% mask = ones(size(mask));
figure, imshowf(mask(:, :, 1, :, 1))
y = ksp .* mask;
%% Generate Maps using ESPIRiT
ksize = [6, 6];
[maps, weights] = ecalib(y(:, :, :, 1, 1), ncalib, ksize);
figure, imshow3(abs(maps .* repmat( weights,1,1,nc)));
titlef('Sensitivity Maps');
maps = repmat(maps, [1, 1, 1, 1, ne]);
weights = repmat(weights, [1, 1, 1, 1, ne]);
%% Create linear operators
C = ChemCombine(TE, FieldStrength, ppm);
S = ESPIRiT(maps, weights);
F = p2DFT(mask,[sx, sy, nc, nm, ne]);
M = Repmat([1, 1, 1, 1, ne, 1]);
P = Offres(TE, ns);
%% Get initial solution and phase wraps
x = S' * (F' * y);
ncycles = 8;
[m0, p0, W] = csinit(x, C, M, ncycles);
figure, imshow3(m0)
figure, imshow3(p0)
%% Create proximal operators
lambdam = 0.003;
lambdap = 0.05;
Pm = wave_thresh('db4', 3, lambdam);
Pp = wave_thresh('db6', 3, lambdap);
%% Proposed phase regularized reconstruction with phase cycling
niter = 100;
ninneriter = 10;
doplot = 1;
dohogwild = 1;
[m, p] = mprecon(y, F, S, C, M, P, Pm, Pp, m0, p0, W, niter, ninneriter, dohogwild, doplot);
figure, imshow3(m)
figure, imshow3(p)
%% Sharma et al.
A = calculate_chemical_shift_encoding_matrix(FieldStrength, ppm, TE);
lambdam = 0.01;
niter = 100;
ninneriter = 10;
stepsize = 0.75;
minwinsize = 16;
damp = 0.01;
Pm = wave_thresh('db4', 3, lambdam);
p0 = p0 * 0;
[ms, ps] = restricted_subspace_recon(y, F, S, C, M, P, Pm, A, m0, p0, TE, niter, ninneriter, stepsize, minwinsize, damp);
%%
figure, imshow3f(ms)
sos = sqrt(sum(abs(ms).^2, 6));
immask = sos > max(sos(:)) * 0.1;
figure, imshow3f(ps .* immask)