summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/DemoRD1.m2
-rw-r--r--demos/DemoRD2.m12
-rw-r--r--main_func/FISTA_REC.m11
3 files changed, 14 insertions, 11 deletions
diff --git a/demos/DemoRD1.m b/demos/DemoRD1.m
index c25bb3e..e190d34 100644
--- a/demos/DemoRD1.m
+++ b/demos/DemoRD1.m
@@ -75,7 +75,7 @@ params.L_const = 3500; % Lipshitz constant
params.Regul_LambdaTV = 0.0003; % TV regularization parameter
params.fidelity = 'student'; % choosing Student t penalty
params.show = 1;
-params.initilize = 1; % warm start with SIRT
+params.initialize = 1; % warm start with SIRT
params.maxvalplot = 0.6; params.slice = 1;
tic; [X_fistaStudentTV] = FISTA_REC(params); toc;
diff --git a/demos/DemoRD2.m b/demos/DemoRD2.m
index ab4da96..518e24b 100644
--- a/demos/DemoRD2.m
+++ b/demos/DemoRD2.m
@@ -75,6 +75,7 @@ params.proj_geom = proj_geom; % pass geometry to the function
params.vol_geom = vol_geom;
params.sino = Sino3D;
params.iterFISTA = 40;
+params.L_const = 7.6789e+08;
params.Regul_LambdaTV = 0.005; % TV regularization parameter for FISTA-TV
params.Ring_LambdaR_L1 = 0.002; % Soft-Thresh L1 ring variable parameter
params.Ring_Alpha = 21; % to boost ring removal procedure
@@ -108,17 +109,16 @@ figure; imshow(X_fista_GH_TVLLT(:,:,1) , [0, 2.5]); title ('FISTA-GH-TV-LLT reco
%%
% fprintf('%s\n', 'Reconstruction using FISTA-Student-TV...');
% clear params
+% params.proj_geom = proj_geom; % pass geometry to the function
+% params.vol_geom = vol_geom;
% params.sino = Sino3D(:,:,10);
-% params.N = recon_size;
-% params.angles = angles_rad;
-% params.iterFISTA = 100;
+% params.iterFISTA = 50;
% params.L_const = 0.01; % Lipshitz constant
-% params.lambdaTV = 0.006; % TV regularization parameter for FISTA-TV
-% params.tol = 1.0e-04;
-% params.iterTV = 20;
+% params.Regul_LambdaTV = 0.008; % TV regularization parameter for FISTA-TV
% params.fidelity = 'student'; % choosing Student t penalty
% params.weights = Weights3D(:,:,10);
% params.show = 0;
+% params.initialize = 1;
% params.maxvalplot = 2.5; params.slice = 1;
%
% tic; [X_fistaStudentTV] = FISTA_REC(params); toc;
diff --git a/main_func/FISTA_REC.m b/main_func/FISTA_REC.m
index ed74181..e21ba60 100644
--- a/main_func/FISTA_REC.m
+++ b/main_func/FISTA_REC.m
@@ -165,7 +165,7 @@ if (isfield(params,'slice'))
else
slice = 1;
end
-if (isfield(params,'initilize'))
+if (isfield(params,'initialize'))
% Create a data object for the reconstruction
rec_id = astra_mex_data3d('create', '-vol', vol_geom);
@@ -215,7 +215,7 @@ if (lambdaR_L1 > 0)
[sino_id, sino_updt] = astra_create_sino3d_cuda(X_t, proj_geom, vol_geom);
for kkk = 1:anglesNumb
- add_ring(:,kkk,:) = sino(:,kkk,:) - alpha_ring.*r_x;
+ add_ring(:,kkk,:) = squeeze(sino(:,kkk,:)) - alpha_ring.*r_x;
end
residual = weights.*(sino_updt - add_ring);
@@ -223,9 +223,12 @@ if (lambdaR_L1 > 0)
if (precondition == 1)
residual = filtersinc(residual'); % filtering residual (Fourier preconditioning)
residual = residual';
- end
-
+ end
+
vec = sum(residual,2);
+ if (SlicesZ > 1)
+ vec = squeeze(vec(:,1,:));
+ end
r = r_x - (1./L_const).*vec;