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

6D-reconstruction: small output improvement for shape function algorithm setup

parent d8256f7d
No related branches found
No related tags found
No related merge requests found
...@@ -478,7 +478,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle ...@@ -478,7 +478,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
grains_props = self.get_selected_props(orients, sel_bls); grains_props = self.get_selected_props(orients, sel_bls);
[w_tab, ref_ws] = self.get_shape_funcs_w_tab(shape_funcs, omegas); [w_tab, ref_ws] = self.get_shape_funcs_w_tab(shape_funcs, omegas);
[lims_blobs_w, lims_projs_w, paddings] = self.get_blob_lims(w_tab, bl, ref_ws); [lims_blobs_w, lims_projs_w, paddings, ext_blobs_w_orig] = self.get_blob_lims(w_tab, bl, ref_ws);
blobs = self.pad_blobs(bl, paddings); blobs = self.pad_blobs(bl, paddings);
% Let's restrict blobs to the reached regions % Let's restrict blobs to the reached regions
...@@ -486,7 +486,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle ...@@ -486,7 +486,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
fprintf('Blob: %03d (n. %03d) --> ', ii, sel_incl_indx(ii)) fprintf('Blob: %03d (n. %03d) --> ', ii, sel_incl_indx(ii))
fprintf('Blob limits %4d:%4d, Projs limits %4d:%4d, Paddings %2d:%2d, Size 1:%2d -> Intensity: %3.3f\n', ... fprintf('Blob limits %4d:%4d, Projs limits %4d:%4d, Paddings %2d:%2d, Size 1:%2d -> Intensity: %3.3f\n', ...
lims_blobs_w(ii, :), round(lims_projs_w(ii, :)), ... ext_blobs_w_orig(ii, :), round(lims_projs_w(ii, :)), ...
paddings(ii, :), size(blobs{ii}, 3), sum(blobs{ii}(:))); paddings(ii, :), size(blobs{ii}, 3), sum(blobs{ii}(:)));
blobs{ii} = permute(blobs{ii}, [1 3 2]); blobs{ii} = permute(blobs{ii}, [1 3 2]);
...@@ -704,7 +704,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle ...@@ -704,7 +704,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
end end
end end
function [ext_blobs_w, ext_projs_w, paddings] = get_blob_lims(self, w_tab, bl, ref_int_ws) function [ext_blobs_w, ext_projs_w, paddings, ext_blobs_w_orig] = get_blob_lims(self, w_tab, bl, ref_int_ws)
% Finding limits for the shape functions % Finding limits for the shape functions
% Let's add extreme values % Let's add extreme values
...@@ -712,19 +712,19 @@ classdef Gt6DReconstructionAlgorithmFactory < handle ...@@ -712,19 +712,19 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
min([w_tab(:, :, 1), w_tab(:, :, 2)], [], 2), ... min([w_tab(:, :, 1), w_tab(:, :, 2)], [], 2), ...
max([w_tab(:, :, 1), w_tab(:, :, 2)], [], 2) ]; max([w_tab(:, :, 1), w_tab(:, :, 2)], [], 2) ];
ext_blobs_w = vertcat( bl(:).bbwim ); ext_blobs_w_orig = vertcat( bl(:).bbwim );
% Let's treat those blobs at the w edge 360->0 % Let's treat those blobs at the w edge 360->0
% (from the blobs perspective) % (from the blobs perspective)
ext_blobs_w = gtGrainAnglesTabularFix360deg(ext_blobs_w, ref_int_ws, self.parameters); ext_blobs_w_orig = gtGrainAnglesTabularFix360deg(ext_blobs_w_orig, ref_int_ws, self.parameters);
paddings(:, 1) = max(ext_blobs_w(:, 1) - ext_projs_w(:, 1), 0); paddings(:, 1) = max(ext_blobs_w_orig(:, 1) - ext_projs_w(:, 1), 0);
paddings(:, 2) = max(ext_projs_w(:, 2) - ext_blobs_w(:, 2), 0); paddings(:, 2) = max(ext_projs_w(:, 2) - ext_blobs_w_orig(:, 2), 0);
% Adding the padding % Adding the padding
ext_blobs_w = [ ... ext_blobs_w = [ ...
ext_blobs_w(:, 1) - paddings(:, 1), ... ext_blobs_w_orig(:, 1) - paddings(:, 1), ...
ext_blobs_w(:, 2) + paddings(:, 2) ]; ext_blobs_w_orig(:, 2) + paddings(:, 2) ];
end end
function [w_tab, sliceLims, lims, absLims, ext_blobs_w, ext_projs_w] ... function [w_tab, sliceLims, lims, absLims, ext_blobs_w, ext_projs_w] ...
......
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