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

FED's fwdproj: minor improvements

parent a0b38f1f
No related branches found
No related tags found
No related merge requests found
......@@ -92,8 +92,8 @@ function [gvb, bl] = gtFedFwdProjExact(gv, gvb, bl, fedpars, parameters, det_num
end
% Detector coordinates U,V in blob
bbort = bbor(ii, :)';
ucbl = ucbl - bbort(:, ones(1, nv));
bbor_t = bbor(ii, :)';
ucbl = ucbl - bbor_t(:, ones(1, nv));
% U,V shift relative to reference state
gvb(ii).ucd = ucbl - gvb(ii).uc0bl - gvb(ii).uc;
......@@ -109,8 +109,8 @@ function [gvb, bl] = gtFedFwdProjExact(gv, gvb, bl, fedpars, parameters, det_num
% This way of rounding is correct also for round values when mu=mod...
% is used above:
ul = floor(ucbl); % lower pixel indices
uh = ul + 1; % higher pixel indices
ul = floor(ucbl); % lower pixel indices
uh = ul + 1; % higher pixel indices
% uvw indices of 8 nearest neighbours (3xnx8)
ucbl8 = [ ul, ...
......
......@@ -290,11 +290,12 @@ for n = 1:num_dets
%%% Preallocate blob volumes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
maxdiag = ceil(sqrt(grenv*grenv'));
dim_u = ceil(mean(grenv(1:2) .* recgeo(1).voxsize(1:2) ./ recgeo(n).voxsize(1:2)));
dim_v = ceil(grenv(3) .* recgeo(1).voxsize(3) ./ recgeo(n).voxsize(3));
for ii = 1:nbl
% Bounding box sizes and boundaries for processing
bl(ii).bbsize = [ maxdiag, maxdiag, 2 ] + 2 * bl(ii).addbl;
bl(ii).bbsize = [ dim_u, dim_v, 2 ] + 2 * bl(ii).addbl;
im_low_lims = round( bl(ii).u0im - bl(ii).bbsize/2 );
bl(ii).bbuim = [im_low_lims(1), im_low_lims(1) + bl(ii).bbsize(1) - 1];
......@@ -302,11 +303,12 @@ for n = 1:num_dets
bl(ii).bbwim = [im_low_lims(3), im_low_lims(3) + bl(ii).bbsize(3) - 1];
% Blob origin and center [u, v, w]:
bl(ii).bbor = [bl(ii).bbuim(1)-1, bl(ii).bbvim(1)-1, bl(ii).bbwim(1)-1];
bl(ii).bbor = [bl(ii).bbuim(1), bl(ii).bbvim(1), bl(ii).bbwim(1)] - 1;
bl(ii).bbcent = [round( (bl(ii).bbuim(1) + bl(ii).bbuim(2))/2 ), ...
round( (bl(ii).bbvim(1) + bl(ii).bbvim(2))/2 ), ...
round( (bl(ii).bbwim(1) + bl(ii).bbwim(2))/2 ) ];
bl(ii).bbcent = [ ...
round( (bl(ii).bbuim(1) + bl(ii).bbuim(2))/2 ), ...
round( (bl(ii).bbvim(1) + bl(ii).bbvim(2))/2 ), ...
round( (bl(ii).bbwim(1) + bl(ii).bbwim(2))/2 ) ];
% Projection parameters
bl(ii).proj_geom = gtGeoProjForReconstruction( ...
......
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