-
Notifications
You must be signed in to change notification settings - Fork 3
/
toy_complex_Brain1_Random.m
executable file
·38 lines (31 loc) · 1.19 KB
/
toy_complex_Brain1_Random.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% This script is used to obtain the results in the paper
%%%% "Calibrationless Parallel MRI with Joint Total Variation
%%%% Regularization"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all; close all;
rand('state',0); rand('state',0);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load rawdata_brain;
im = ifft2c(raw_data);
% Parameter Settings
sigma = 0.01; % data noise
alpha = 4e-2; beta = 4e-2; % regularization parameters
d = 4; %parameter to control sampling ratio d=3.45 for 33% d=4 for 25% d=4.4 for 20%
maxIter=50; %iteration number for CSSENSE, SPGL1 and JTVMRI
m=256; n=m;
coils = 8; T=coils;
%% Generate Mask
samplingratio = 0;
OMEGA = RandMask_rect(double(m/d),double(n/d),m,n);
mask = RandMask_InverseTransfer(OMEGA,m,n);
%mask(m/2-14:m/2+15,n/2-14:n/2+15) = ones(30,30); % Why? The central white box?
OMEGA = find(fftshift(mask)==1);
k = 2*length(OMEGA)+1;
samplingratio = samplingratio + length(OMEGA);
omask = zeros(m, n);
omask(OMEGA) = 1;
figure;
imshow(omask, []);
figure;
imshow(mask, []);