-
Nicola Vigano authored
6D-Reconstruction: updated Cluster/Twins/Extended creation functions to share more code and support multi-detector Signed-off-by:
Nicola Vigano <nicola.vigano@esrf.fr>
Nicola Vigano authored6D-Reconstruction: updated Cluster/Twins/Extended creation functions to share more code and support multi-detector Signed-off-by:
Nicola Vigano <nicola.vigano@esrf.fr>
gt6DCalculateFullSpaceCorners.m 1.35 KiB
function orients = gt6DCalculateFullSpaceCorners(estim_space_bbox_mm, bbox_size_mm, estim_orient_bbox, bbox_size_rod, refgr, p)
orients = cell(2, 2, 2, 2, 2, 2);
for ii_x1 = 0:1
base_x1 = estim_space_bbox_mm(1:3) + [ii_x1 * bbox_size_mm(1), 0, 0];
for ii_x2 = 0:1
base_x2 = base_x1 + [0, ii_x2 * bbox_size_mm(2), 0];
for ii_x3 = 0:1
base_x3 = base_x2 + [0, 0, ii_x3 * bbox_size_mm(3)];
for ii_r1 = 0:1
base_r1 = estim_orient_bbox(1:3) + [ii_r1 * bbox_size_rod(1), 0, 0];
for ii_r2 = 0:1
base_r2 = base_r1 + [0, ii_r2 * bbox_size_rod(2), 0];
for ii_r3 = 0:1
base_r3 = base_r2 + [0, 0, ii_r3 * bbox_size_rod(3)];
% fprintf(' center: %f, %f, %f, r_vec: %f, %f, %f\n', base_x3, base_r3)
orients{ii_r3+1, ii_r2+1, ii_r1+1, ii_x3+1, ii_x2+1, ii_x1+1} = struct( ...
'id', refgr.id, 'phaseid', refgr.phaseid, ...
'center', base_x3, 'R_vector', base_r3);
end
end
end
end
end
end
orients = gtCalculateGrain_p(orients, p, 'ref_omind', refgr.allblobs.omind);
orients = [orients{:}];
end