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

ODF-Solvers-uvw: fixed sinogram creation

parent 2be0e3bc
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,16 @@ classdef GtGrainODFuvwSolver < GtGrainODFwSolver
end
function build_sinogram(self)
bls = self.sampler.bl(self.sampler.selected);
if (self.verbose)
fprintf('Building sinogram..')
c = tic();
end
ref_sel = self.sampler.selected;
bls = self.sampler.bl(ref_sel);
ref_inc = self.sampler.ondet(self.sampler.included);
ref_gr = self.sampler.get_reference_grain();
ref_ws = ref_gr.allblobs.detector(self.sampler.detector_index).uvw(ref_inc(ref_sel), 3);
num_blobs = numel(bls);
blob_sizes = cat(1, bls(:).bbsize);
......@@ -114,7 +123,13 @@ classdef GtGrainODFuvwSolver < GtGrainODFwSolver
proj_uv_lims = proj_uv_lims(self.sampler.selected, :, :);
end
proj_w_lims = [min(proj_w_lims(:, 1, :), [], 3), max(proj_w_lims(:, 2, :), [], 3)];
proj_w_mins = reshape(proj_w_lims(:, 1, :), num_blobs, []);
proj_w_maxs = reshape(proj_w_lims(:, 2, :), num_blobs, []);
proj_w_mins = gtGrainAnglesTabularFix360deg(proj_w_mins, ref_ws, self.parameters);
proj_w_maxs = gtGrainAnglesTabularFix360deg(proj_w_maxs, ref_ws, self.parameters);
proj_w_lims = [min(proj_w_mins, [], 2), max(proj_w_maxs, [], 2)];
delta_ws = proj_w_lims(:, 2) - proj_w_lims(:, 1) + 1;
else
[delta_ws, proj_w_lims] = self.sampler.get_omega_deviations(with_shape_functions);
......@@ -151,7 +166,7 @@ classdef GtGrainODFuvwSolver < GtGrainODFwSolver
self.sino = reshape(self.sino, [], 1);
if (self.verbose)
fprintf('Sino size: [%d, %d, %d, %d]\n', self.size_sino);
fprintf('\b\b: Done in %g seconds.\n - Sino size: [%d, %d, %d, %d]\n', toc(c), self.size_sino);
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