--- /dev/null
+function vol = astra_iradon_3d(sino, theta)
+% this function calculates 3D iradon transform of the volume using ASTRA tools
+
+ sz = size(sino);
+
+ % initialize ASTRA projector:
+ proj_geom = astra_create_proj_geom('parallel3d', 1, 1, sz(3), sz(1), theta);
+ vol_geom = astra_create_vol_geom(sz(1), sz(1), sz(3));
+ %proj_id = astra_create_projector('linear3d', proj_geom, vol_geom);
+
+ % copy data to GPU:
+ volume_id = astra_mex_data3d('create','-vol', vol_geom, 0);
+ sino_id = astra_mex_data3d('create','-sino', proj_geom, sino);
+
+ % initialize algorithm:
+ cfg = astra_struct('BP3D_CUDA');
+ %cfg.ProjectorId = proj_id;
+ cfg.ProjectionDataId = sino_id;
+ cfg.ReconstructionDataId = volume_id;
+ %cfg.FilterType = 'none';
+
+ % run:
+ alg_id = astra_mex_algorithm('create', cfg);
+ astra_mex_algorithm('run', alg_id);
+ vol = astra_mex_data3d('get', volume_id) * 2 * size(proj_geom.ProjectionAngles,2) / pi;
+
+ % kill stuff:
+ astra_mex_data3d('delete', sino_id);
+ astra_mex_data3d('delete', volume_id);
+ astra_mex_algorithm('delete', alg_id);
+ %astra_mex_projector('delete', proj_id);
+end
\ No newline at end of file