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

Moved zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrainFwdProj.m to use the...

Moved zUtil_Deformation/gt6DCreateProjDataFromTwinnedGrainFwdProj.m to use the new twin reconstruction path

Signed-off-by: default avatarNicola Vigano <nicola.vigano@esrf.fr>
parent 239435a4
No related branches found
No related tags found
No related merge requests found
...@@ -480,7 +480,7 @@ function [cl, estim_space_bbox_pix, estim_orient_bbox_rod] = gt6DCreateProjDataF ...@@ -480,7 +480,7 @@ function [cl, estim_space_bbox_pix, estim_orient_bbox_rod] = gt6DCreateProjDataF
blobs = assign_masks(blobs, proj_bl_masks, ~extended_projs(ii_g).shared_refl_inc); blobs = assign_masks(blobs, proj_bl_masks, ~extended_projs(ii_g).shared_refl_inc);
end end
fprintf('\b\b: Done in %g seconds.\n - Equalizing blob sizes..', toc(c)) fprintf('\b\b: Done in %g seconds.\n - Equalizing blob sizes: ', toc(c))
c = tic(); c = tic();
for ii_b = 1:num_blobs for ii_b = 1:num_blobs
...@@ -514,16 +514,16 @@ function [cl, estim_space_bbox_pix, estim_orient_bbox_rod] = gt6DCreateProjDataF ...@@ -514,16 +514,16 @@ function [cl, estim_space_bbox_pix, estim_orient_bbox_rod] = gt6DCreateProjDataF
proj.included = extended_projs(ii_g).included; proj.included = extended_projs(ii_g).included;
proj.selected = extended_projs(ii_g).selected; proj.selected = extended_projs(ii_g).selected;
% Temporary solution that allows the parent + twin configuration to
% work, but it should be replaced by a more advanced global
% solution for handling shared blobs by different orientation boxes
if (ii_g > 1) if (ii_g > 1)
proj.shared_bls_with_parent = zeros(size(extended_projs(ii_g).shared_refl_inc)); shared_inc = extended_projs(ii_g).shared_refl_inc;
proj.shared_bls_with_parent(extended_projs(ii_g).shared_refl_inc) = extended_projs(ii_g).shared_refl_pos_in_parent_inc; non_shared_blobs = blobs(~shared_inc);
proj.global_pos = zeros(size(proj.included));
samp_ors(1).proj(conf.det_index).shared_bls_with_twins(extended_projs(ii_g).shared_refl_pos_in_parent_inc) = true; proj.global_pos(~shared_inc) = numel(all_blobs_list) + (1:numel(non_shared_blobs))';
proj.global_pos(shared_inc) = extended_projs(ii_g).shared_refl_pos_in_parent_inc;
all_blobs_list = cat(1, all_blobs_list(:), non_shared_blobs(:));
else else
proj.shared_bls_with_twins = false(num_blobs, 1); proj.global_pos = (1:numel(blobs));
all_blobs_list = blobs;
end end
samp_ors(ii_g).proj(conf.det_index) = proj; samp_ors(ii_g).proj(conf.det_index) = proj;
...@@ -548,7 +548,10 @@ function [cl, estim_space_bbox_pix, estim_orient_bbox_rod] = gt6DCreateProjDataF ...@@ -548,7 +548,10 @@ function [cl, estim_space_bbox_pix, estim_orient_bbox_rod] = gt6DCreateProjDataF
drawnow(); drawnow();
end end
cl = struct('samp_ors', samp_ors, 'conf', conf); cl = struct(...
'samp_ors', samp_ors, ...
'blobs', {all_blobs_list}, ...
'conf', conf);
if (conf.save) if (conf.save)
str_ids = sprintf('_%04d', grs_list); str_ids = sprintf('_%04d', grs_list);
......
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