From 09bc8812ac3695d2c9c4bf3dbbab17e117d6a6c6 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 22 Apr 2014 14:16:11 +0000 Subject: Use new data3d link in astra_create_sino3d_cuda --- matlab/tools/astra_create_sino3d_cuda.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/matlab/tools/astra_create_sino3d_cuda.m b/matlab/tools/astra_create_sino3d_cuda.m index ef22ebe..a725d82 100644 --- a/matlab/tools/astra_create_sino3d_cuda.m +++ b/matlab/tools/astra_create_sino3d_cuda.m @@ -26,7 +26,12 @@ function [sino_id, sino] = astra_create_sino3d_cuda(data, proj_geom, vol_geom) % store volume if (numel(data) > 1) - volume_id = astra_mex_data3d('create','-vol', vol_geom, data); + if (strcmp(class(data),'single')) + % read-only link + volume_id = astra_mex_data3d('link','-vol', vol_geom, data, 1); + else + volume_id = astra_mex_data3d('create','-vol', vol_geom, data); + end else volume_id = data; end -- cgit v1.2.3