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

6D-Twin-Reconstruction: fixed a bug in the geometry assembling phase

parent 65d2e378
No related branches found
No related tags found
No related merge requests found
......@@ -119,6 +119,9 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
blobs = cat(1, algo_params(:).blobs);
psf = cat(1, algo_params(:).psf);
% psf = fspecial('gaussian', 21, 0.75) + 2 * fspecial('gaussian', 21, 4);
% psf = psf / sum(psf(:));
% psf = { permute(psf, [1 3 2]) };
geometries = cat(1, algo_params(:).geometries);
geometries_ss = cat(1, algo_params(:).geometries_ss);
......@@ -188,7 +191,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
for ii_b = 1:numel(all_shared_blobs)
% if they changed, let's enlarge them
if (to_be_changed(ii_b))
proj_shift = rescaled_shared_blobs_w_lims(all_shared_blobs(ii_b), 1, 2) ...
proj_shifts = rescaled_shared_blobs_w_lims(all_shared_blobs(ii_b), 1, 2) ...
- rescaled_shared_blobs_w_lims(all_shared_blobs(ii_b), 1, 1);
curr_blob_size = size(blobs{all_shared_blobs(ii_b)});
......@@ -196,7 +199,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
% Creating the new blob
new_blob = zeros(new_size, 'like', blobs{all_shared_blobs(ii_b)});
new_blob = gtPlaceSubVolume(new_blob, blobs{all_shared_blobs(ii_b)}, [0, proj_shift, 0]);
new_blob = gtPlaceSubVolume(new_blob, blobs{all_shared_blobs(ii_b)}, [0, proj_shifts, 0]);
blobs{all_shared_blobs(ii_b)} = new_blob;
% Fixing the shift in parent's projection
......@@ -206,15 +209,15 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
inds_of_shared_blobs = offsets_ss{ii_o}{ii_ss}.blob_offsets == all_shared_blobs(ii_b);
offsets_ss{ii_o}{ii_ss}.proj_offsets(inds_of_shared_blobs) ...
= offsets_ss{ii_o}{ii_ss}.proj_offsets(inds_of_shared_blobs) + proj_shift;
= offsets_ss{ii_o}{ii_ss}.proj_offsets(inds_of_shared_blobs) + proj_shifts;
end
end
else
for ii_o = 1:numel(offsets)
inds_of_shared_blobs = offsets{ii_o}.blob_offsets == all_shared_blobs(ii_b);
inds_of_shared_blobs = offsets{ii_o}.proj_offsets == all_shared_blobs(ii_b);
offsets{ii_o}.blob_offsets(inds_of_shared_blobs) ...
= offsets{ii_o}.blob_offsets(inds_of_shared_blobs) + proj_shift;
offsets{ii_o}.proj_offsets(inds_of_shared_blobs) ...
= offsets{ii_o}.proj_offsets(inds_of_shared_blobs) + proj_shifts;
end
end
end
......
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