Skip to content
Snippets Groups Projects
Commit f7ee9103 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Test-generation: fixed voxels center position

parent 07137c89
No related branches found
No related tags found
No related merge requests found
......@@ -250,13 +250,26 @@ for n = 1:num_dets
fprintf(' %3d) %4d %4d %4d\n', [(1:nbl)', vertcat(bl(:).mbbsize)]')
end
% Bringing back the gv.cs field to what it should be
if (isfield(fedpars, 'volume_super_sampling') ...
&& (fedpars.volume_super_sampling > 1))
gv.cs = compute_base_voxel_centers(gv, fedpars, recgeo(1));
end
end
function gvcs = compute_base_voxel_centers(gv, fedpars, recgeo)
nv = size(gv.ind, 2);
nv_ones = ones(nv, 1);
gvcs = fedpars.vox000sam(nv_ones, :)' + (gv.ind - 0.5) .* recgeo.voxsize(nv_ones, :)';
end
function [gvcs, gvd] = compute_voxel_centers(gv, dmvol, fedpars, recgeo)
nv = size(gv.ind, 2);
nv_ones = ones(nv, 1);
base_gvcs = fedpars.vox000sam(nv_ones, :)' + gv.ind .* recgeo.voxsize(nv_ones, :)';
base_gvcs = compute_base_voxel_centers(gv, fedpars, recgeo);
if (isfield(fedpars, 'volume_super_sampling') ...
&& (fedpars.volume_super_sampling > 1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment