From c91436873e48d531b9313f9c10fa5f89bcb90ab6 Mon Sep 17 00:00:00 2001 From: algol Date: Fri, 20 Oct 2017 16:16:32 +0100 Subject: demo_parallel update --- demos/Demo_Phantom3D_Parallel.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'demos') diff --git a/demos/Demo_Phantom3D_Parallel.m b/demos/Demo_Phantom3D_Parallel.m index 9ef1f3c..402bdd2 100644 --- a/demos/Demo_Phantom3D_Parallel.m +++ b/demos/Demo_Phantom3D_Parallel.m @@ -32,6 +32,18 @@ sino3D_log = log(dose./max(dataRaw,1))*multifactor; %log corrected data -> sinog clear dataExp sino_tomophan3D % %% +%-------------Astra toolbox------------% +% one can generate data using ASTRA toolbox +proj_geom = astra_create_proj_geom('parallel', 1, det_size, angles_rad); +vol_geom = astra_create_vol_geom(N,N); +sino_ASTRA3D = zeros(det_size, length(angles), N, 'single'); +for i = 1:N +[sino_id, sinoT] = astra_create_sino_cuda(TomoPhantom(:,:,i), proj_geom, vol_geom); +sino_ASTRA3D(:,:,i) = sinoT'; +astra_mex_data2d('delete', sino_id); +end +%--------------------------------------% +%% % using ASTRA-toolbox to set the projection geometry (parallel beam) proj_geom = astra_create_proj_geom('parallel', 1, det_size, angles_rad); vol_geom = astra_create_vol_geom(N,N); -- cgit v1.2.3