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

6D-Reconstruction/Twins: yet one more fix

parent a6ef703a
No related branches found
No related tags found
No related merge requests found
......@@ -205,9 +205,13 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
parent_corresp_shared_blobs = selected_pos_in_included(shared_pos(shared));
proj_shifts = rescaled_shared_blobs_w_lims(parent_corresp_shared_blobs, 1, ii_o_reg+1) ...
% This shift is related to the new size of the shared
% blobs, to accomodate every other sampled region in
% orientation-space
proj_shifts = ...
rescaled_shared_blobs_w_lims(parent_corresp_shared_blobs, 1, ii_o_reg+1) ...
- rescaled_shared_blobs_w_lims(parent_corresp_shared_blobs, 1, 1);
blobs_with_proj_to_be_shifted = find(proj_shifts > 0);
blobs_with_projs_to_be_shifted = find(proj_shifts > 0);
% Shifting projection to the concatenated blobs, unless that
% blob was shared between parent and twin
......@@ -238,11 +242,12 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
% And now taking care of the positions inside
% those blobs
for ii_b = 1:numel(blobs_with_proj_to_be_shifted)
inds_of_shared_blobs = inds_of_blobs == selected_pos_in_included(blobs_with_proj_to_be_shifted(ii_b));
for ii_b = 1:numel(blobs_with_projs_to_be_shifted)
ind_of_parent_blob = parent_corresp_shared_blobs(blobs_with_projs_to_be_shifted(ii_b));
inds_of_shared_blobs = inds_of_blobs == ind_of_parent_blob;
proj_coeffs_ss{ii_o}{ii_ss}.proj_offsets(inds_of_shared_blobs) = ...
proj_coeffs_ss{ii_o}{ii_ss}.proj_offsets(inds_of_shared_blobs) + proj_shifts(blobs_with_proj_to_be_shifted(ii_b));
proj_coeffs_ss{ii_o}{ii_ss}.proj_offsets(inds_of_shared_blobs) + proj_shifts(blobs_with_projs_to_be_shifted(ii_b));
end
end
end
......@@ -273,11 +278,12 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
% And now taking care of the positions inside
% those blobs
for ii_b = 1:numel(blobs_with_proj_to_be_shifted)
inds_of_shared_blobs = inds_of_blobs == selected_pos_in_included(blobs_with_proj_to_be_shifted(ii_b));
for ii_b = 1:numel(blobs_with_projs_to_be_shifted)
ind_of_parent_blob = parent_corresp_shared_blobs(blobs_with_projs_to_be_shifted(ii_b));
inds_of_shared_blobs = inds_of_blobs == ind_of_parent_blob;
proj_coeffs{ii_o}.proj_offsets(inds_of_shared_blobs) = ...
proj_coeffs{ii_o}.proj_offsets(inds_of_shared_blobs) + proj_shifts(blobs_with_proj_to_be_shifted(ii_b));
proj_coeffs{ii_o}.proj_offsets(inds_of_shared_blobs) + proj_shifts(blobs_with_projs_to_be_shifted(ii_b));
end
end
offsets = cat(1, offsets, proj_coeffs);
......
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