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

Phantom generation: converted to multi-detector and changed output format

parent ed472b83
No related branches found
No related tags found
No related merge requests found
function [gvb, bl] = gtFedFwdProjExact(gv, gvb, bl, fedpars, parameters)
function [gvb, bl] = gtFedFwdProjExact(gv, gvb, bl, fedpars, parameters, det_num)
if (~exist('det_num', 'var'))
det_num = 1;
end
fprintf('Forward projection (%s):\n', mfilename)
nbl = length(bl);
nv = size(gv.ind, 2);
detgeo = parameters.detgeo(det_num);
labgeo = parameters.labgeo;
samgeo = parameters.samgeo;
......@@ -25,7 +30,7 @@ uvw = cell(1, nbl);
fprintf(' - Computing indices and bbsizes: ')
t = tic();
% !!! parfor
for ii = 1:nbl
num_chars = fprintf('%03d/%03d', ii, nbl);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -60,8 +65,8 @@ for ii = 1:nbl
gvcs_lab = gtGeoSam2Lab(gvcs', rot_s2l, labgeo, samgeo, false);
ucbl = gtFedPredictUVWMultiple([], dvec_lab, gvcs_lab', ...
labgeo.detrefpos', labgeo.detnorm', labgeo.Qdet, labgeo.detrefuv, ...
om, labgeo.omstep);
detgeo.detrefpos', detgeo.detnorm', detgeo.Qdet, ...
[detgeo.detrefu, detgeo.detrefv]', om, labgeo.omstep);
% Detector coordinates U,V in blob
bbort = bbor(ii, :)';
......@@ -126,12 +131,12 @@ end
fprintf(' Maximum BBox size: [(%d, %d, %d), (%d, %d, %d)]\n', max_bbox_proj_size(1, :), max_bbox_proj_size(2, :));
fprintf(' Maximum Blob size: [(%d, %d, %d), (%d, %d, %d)]\n', max_bbsize_blob(1, :), max_bbsize_blob(2, :));
minimum_blob_size_add = fedpars.blobsizeadd + max( [ ...
minimum_blob_size_add = fedpars.blobsizeadd(det_num, :) + max( [ ...
max_bbsize_blob(1, :) - max_bbox_proj_size(1, :); ...
max_bbox_proj_size(2, :) - max_bbsize_blob(2, :) ...
], [], 1);
fprintf(' Current Blob size add: (%d, %d, %d) -> minimum suggested: (%d, %d, %d)\n', ...
fedpars.blobsizeadd, minimum_blob_size_add);
fedpars.blobsizeadd(det_num, :), minimum_blob_size_add);
fprintf(' - Projecting volumes: ')
t = tic();
......@@ -205,4 +210,4 @@ for ii = 1:nbl
end
fprintf('Done in %f s\n', toc(t));
end % of function
end
This diff is collapsed.
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