diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/Demo1.m | 2 | ||||
-rw-r--r-- | demos/DemoRD1.m | 2 | ||||
-rw-r--r-- | demos/DemoRD2.m | 29 |
3 files changed, 15 insertions, 18 deletions
diff --git a/demos/Demo1.m b/demos/Demo1.m index 3d57795..15e2e5b 100644 --- a/demos/Demo1.m +++ b/demos/Demo1.m @@ -15,7 +15,7 @@ close all;clc;clear all;
% adding paths
addpath('../data/');
-addpath('../main_func/');
+addpath('../main_func/'); addpath('../main_func/regularizers_CPU/');
addpath('../supp/');
load phantom_bone512.mat % load the phantom
diff --git a/demos/DemoRD1.m b/demos/DemoRD1.m index e190d34..5bb5f6b 100644 --- a/demos/DemoRD1.m +++ b/demos/DemoRD1.m @@ -5,7 +5,7 @@ close all % adding paths addpath('../data/'); -addpath('../main_func/'); +addpath('../main_func/'); addpath('../main_func/regularizers_CPU/'); addpath('../supp/'); load('sino_basalt.mat') % load real neutron data diff --git a/demos/DemoRD2.m b/demos/DemoRD2.m index 0f829a8..0db3595 100644 --- a/demos/DemoRD2.m +++ b/demos/DemoRD2.m @@ -1,12 +1,12 @@ % Demonstration of tomographic 3D reconstruction from X-ray synchrotron % dataset (dendrites) using various data fidelities -% warning: can take up to 15-20 minutes to run for the whole 3D data +% ! can take up to 15-20 minutes to run for the whole 3D data ! clear all close all %% % % adding paths addpath('../data/'); -addpath('../main_func/'); +addpath('../main_func/'); addpath('../main_func/regularizers_CPU/'); addpath('../supp/'); load('DendrRawData.mat') % load raw data of 3D dendritic set @@ -30,7 +30,7 @@ Weights3D = single(data_raw3D); % weights for PW model clear data_raw3D %% % set projection/reconstruction geometry here -Z_slices = 20; +Z_slices = 3; det_row_count = Z_slices; proj_geom = astra_create_proj_geom('parallel3d', 1, 1, det_row_count, size_det, angles_rad); vol_geom = astra_create_vol_geom(recon_size,recon_size,Z_slices); @@ -44,14 +44,13 @@ clear params params.proj_geom = proj_geom; % pass geometry to the function params.vol_geom = vol_geom; params.sino = Sino3D; -params.L_const = 7.6789e+08; % found quickly for one slice first -params.iterFISTA = 30; +params.iterFISTA = 35; params.weights = Weights3D; params.show = 1; -params.maxvalplot = 2.5; params.slice = 4; +params.maxvalplot = 2.5; params.slice = 2; tic; [X_fista, output] = FISTA_REC(params); toc; -figure; imshow(X_fista(:,:,1) , [0, 2.5]); title ('FISTA-PWLS reconstruction'); +figure; imshow(X_fista(:,:,params.slice) , [0, 2.5]); title ('FISTA-PWLS reconstruction'); %% fprintf('%s\n', 'Reconstruction using FISTA-PWLS-TV...'); clear params @@ -59,14 +58,13 @@ 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_Lambda_FGPTV = 0.005; % TV regularization parameter for FGP-TV params.weights = Weights3D; params.show = 1; -params.maxvalplot = 2.5; params.slice = 4; +params.maxvalplot = 2.5; params.slice = 2; tic; [X_fista_TV] = FISTA_REC(params); toc; -figure; imshow(X_fista_TV(:,:,1) , [0, 2.5]); title ('FISTA-PWLS-TV reconstruction'); +figure; imshow(X_fista_TV(:,:,params.slice) , [0, 2.5]); title ('FISTA-PWLS-TV reconstruction'); %% %% fprintf('%s\n', 'Reconstruction using FISTA-GH-TV...'); @@ -75,16 +73,15 @@ 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_Lambda_FGPTV = 0.005; % TV regularization parameter for FGP-TV params.Ring_LambdaR_L1 = 0.002; % Soft-Thresh L1 ring variable parameter params.Ring_Alpha = 21; % to boost ring removal procedure params.weights = Weights3D; params.show = 1; -params.maxvalplot = 2.5; params.slice = 4; +params.maxvalplot = 2.5; params.slice = 2; tic; [X_fista_GH_TV] = FISTA_REC(params); toc; -figure; imshow(X_fista_GH_TV(:,:,1) , [0, 2.5]); title ('FISTA-GH-TV reconstruction'); +figure; imshow(X_fista_GH_TV(:,:,params.slice) , [0, 2.5]); title ('FISTA-GH-TV reconstruction'); %% %% fprintf('%s\n', 'Reconstruction using FISTA-GH-TV-LLT...'); @@ -92,7 +89,7 @@ clear params params.proj_geom = proj_geom; % pass geometry to the function params.vol_geom = vol_geom; params.sino = Sino3D; -params.iterFISTA = 40; +params.iterFISTA = 5; params.Regul_Lambda_FGPTV = 0.005; % TV regularization parameter for FGP-TV params.Regul_LambdaHO = 250; % regularization parameter for LLT problem params.Regul_tauLLT = 0.0005; % time-step parameter for the explicit scheme @@ -100,10 +97,10 @@ params.Ring_LambdaR_L1 = 0.002; % Soft-Thresh L1 ring variable parameter params.Ring_Alpha = 21; % to boost ring removal procedure params.weights = Weights3D; params.show = 1; -params.maxvalplot = 2.5; params.slice = 10; +params.maxvalplot = 2.5; params.slice = 2; tic; [X_fista_GH_TVLLT] = FISTA_REC(params); toc; -figure; imshow(X_fista_GH_TVLLT(:,:,1) , [0, 2.5]); title ('FISTA-GH-TV-LLT reconstruction'); +figure; imshow(X_fista_GH_TVLLT(:,:,params.slice) , [0, 2.5]); title ('FISTA-GH-TV-LLT reconstruction'); %% %% % fprintf('%s\n', 'Reconstruction using FISTA-Student-TV...'); |