summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <WillemJan.Palenstijn@uantwerpen.be>2014-04-22 14:16:11 +0000
committerwpalenst <WillemJan.Palenstijn@uantwerpen.be>2014-04-22 14:16:11 +0000
commit09bc8812ac3695d2c9c4bf3dbbab17e117d6a6c6 (patch)
treee85433219254b6612b478b4394627d834c54df17
parent01e94c82d907b8d6aa155affc01160396e794b31 (diff)
downloadastra-09bc8812ac3695d2c9c4bf3dbbab17e117d6a6c6.tar.gz
astra-09bc8812ac3695d2c9c4bf3dbbab17e117d6a6c6.tar.bz2
astra-09bc8812ac3695d2c9c4bf3dbbab17e117d6a6c6.tar.xz
astra-09bc8812ac3695d2c9c4bf3dbbab17e117d6a6c6.zip
Use new data3d link in astra_create_sino3d_cuda
-rw-r--r--matlab/tools/astra_create_sino3d_cuda.m7
1 files changed, 6 insertions, 1 deletions
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