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

Reconstruction: fixed bug with blobs outside of the omega-range

parent 8b8b30d8
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,6 @@ classdef Gt6DReconstructionAlgorithmFactory < handle ...@@ -33,7 +33,6 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
[omega_int_tab, ref_ws_int] = Gt6DReconstructionAlgorithmFactory.getOmegaIntegerTab(grains_props, omegas, sampler.parameters); [omega_int_tab, ref_ws_int] = Gt6DReconstructionAlgorithmFactory.getOmegaIntegerTab(grains_props, omegas, sampler.parameters);
[sub_blob_slices, proj_coeffs, slices_interp] = self.getSubBlobSlices(bl, num_interp, etas); [sub_blob_slices, proj_coeffs, slices_interp] = self.getSubBlobSlices(bl, num_interp, etas);
blobs = cell(size(sub_blob_slices));
num_images = gtGetTotNumberOfImages(sampler.parameters); num_images = gtGetTotNumberOfImages(sampler.parameters);
[slice_lims, lims, abs_lims, ~, extremesOfBlobs, extremesOmIntTab] = ... [slice_lims, lims, abs_lims, ~, extremesOfBlobs, extremesOmIntTab] = ...
...@@ -46,6 +45,29 @@ classdef Gt6DReconstructionAlgorithmFactory < handle ...@@ -46,6 +45,29 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
good_orients = overflow_o < tot_blobs; good_orients = overflow_o < tot_blobs;
grains_props = grains_props(good_orients); grains_props = grains_props(good_orients);
omega_int_tab = omega_int_tab(:, good_orients); omega_int_tab = omega_int_tab(:, good_orients);
tot_orientations = numel(find(good_orients));
% We have to remove the blobs where no orientation projects
good_blobs = overflow_b < tot_orientations;
if (numel(find(good_blobs)) < tot_blobs)
fprintf(['WARNING! Some selected blobs were filtered out, ' ...
'due to no orientation projecting to the said blob:\n'])
disp(find(~good_blobs)')
end
bl = bl(good_blobs);
sub_blob_slices = sub_blob_slices(good_blobs);
proj_coeffs = proj_coeffs(good_blobs);
etas = etas(good_blobs);
omegas = omegas(good_blobs);
slices_interp = slices_interp(good_blobs);
slice_lims = slice_lims(good_blobs, :);
abs_lims = abs_lims(good_blobs, :);
lims = lims(good_blobs, :);
omega_int_tab = omega_int_tab(good_blobs, :);
extremesOfBlobs = extremesOfBlobs(good_blobs, :);
extremesOmIntTab = extremesOmIntTab(good_blobs, :);
overflow_b = overflow_b(good_blobs);
tot_blobs = numel(find(good_blobs));
if (~isempty(grains_ss)) if (~isempty(grains_ss))
grains_ss = [grains_ss{:}]; grains_ss = [grains_ss{:}];
...@@ -79,6 +101,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle ...@@ -79,6 +101,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
extremesOmIntTab_tot = extremesOmIntTab; extremesOmIntTab_tot = extremesOmIntTab;
end end
blobs = cell(size(sub_blob_slices));
% Let's restrict blobs to the reached regions % Let's restrict blobs to the reached regions
for ii = 1:tot_blobs for ii = 1:tot_blobs
fprintf('Blob: %03d --> ', ii) fprintf('Blob: %03d --> ', ii)
......
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