summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFolkert Bleichrodt <F.Bleichrodt@cwi.nl>2016-03-14 13:18:02 +0100
committerFolkert Bleichrodt <F.Bleichrodt@cwi.nl>2016-03-14 13:18:02 +0100
commit6205f3fcc68be3d49fa5b47a02a65c21ffc53930 (patch)
tree251bb894027b1531fdf181c430fd426b8c07f12d
parent5a81584cb37fe578d5985b8e78b511076fa75b1c (diff)
downloadastra-6205f3fcc68be3d49fa5b47a02a65c21ffc53930.tar.gz
astra-6205f3fcc68be3d49fa5b47a02a65c21ffc53930.tar.bz2
astra-6205f3fcc68be3d49fa5b47a02a65c21ffc53930.tar.xz
astra-6205f3fcc68be3d49fa5b47a02a65c21ffc53930.zip
Removed regression from opTomo
-rw-r--r--matlab/tools/opTomo.m23
1 files changed, 13 insertions, 10 deletions
diff --git a/matlab/tools/opTomo.m b/matlab/tools/opTomo.m
index 33c8565..04b3634 100644
--- a/matlab/tools/opTomo.m
+++ b/matlab/tools/opTomo.m
@@ -176,12 +176,23 @@ classdef opTomo < opSpot
if issparse(x)
x = full(x);
end
+
+ if isa(x, 'double')
+ isdouble = true;
+ x = single(x);
+ else
+ isdouble = false;
+ end
% the multiplication
y = op.funHandle(op, x, mode);
% make sure output is column vector
y = y(:);
+
+ if isdouble
+ y = double(y);
+ end
end % multiply
@@ -206,11 +217,7 @@ classdef opTomo < opSpot
astra_mex_algorithm('iterate', op.fp_alg_id);
% retrieve Matlab array
- if isa(x, 'single')
- y = astra_mex_data2d('get_single', op.sino_id);
- else
- y = astra_mex_data2d('get', op.sino_id);
- end
+ y = astra_mex_data2d('get_single', op.sino_id);
else
% x is passed as a vector, reshape it into a sinogram.
x = reshape(x, op.proj_size);
@@ -222,11 +229,7 @@ classdef opTomo < opSpot
astra_mex_algorithm('iterate', op.bp_alg_id);
% retrieve Matlab array
- if isa(x, 'single')
- y = astra_mex_data2d('get_single', op.vol_id);
- else
- y = astra_mex_data2d('get', op.vol_id);
- end
+ y = astra_mex_data2d('get_single', op.vol_id);
end
end % opTomo_intrnl2D