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

ODF-W-solver: fixed a few bugs due to some other changes

parent ee362287
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,7 @@ classdef GtGrainODFwSolver < handle ...@@ -65,7 +65,7 @@ classdef GtGrainODFwSolver < handle
% INPUT (varargin): same as initialze(self, ref_gr, varargin) % INPUT (varargin): same as initialze(self, ref_gr, varargin)
% %
conf = self.initialize(self, ref_gr, varargin{:}); conf = self.initialize(ref_gr, varargin{:});
switch(lower(conf.algorithm)) switch(lower(conf.algorithm))
case 'sirt' case 'sirt'
...@@ -104,7 +104,8 @@ classdef GtGrainODFwSolver < handle ...@@ -104,7 +104,8 @@ classdef GtGrainODFwSolver < handle
end end
function build_sinogram(self) function build_sinogram(self)
bls = self.sampler.bl(self.sampler.selected); sel_ref = self.sampler.selected;
bls = self.sampler.bl(sel_ref);
num_blobs = numel(bls); num_blobs = numel(bls);
blob_dephs = arrayfun(@(x)size(x.intm, 3), bls); blob_dephs = arrayfun(@(x)size(x.intm, 3), bls);
...@@ -112,18 +113,20 @@ classdef GtGrainODFwSolver < handle ...@@ -112,18 +113,20 @@ classdef GtGrainODFwSolver < handle
blob_lims = cat(1, bls(:).bbwim); blob_lims = cat(1, bls(:).bbwim);
with_shape_functions = ~isempty(self.shape_functions); switch(self.shape_functions_type)
if (with_shape_functions) case 'w'
for ii = numel(self.shape_functions):-1:1 for ii = numel(self.shape_functions):-1:1
proj_lims(:, :, ii) = cat(1, self.shape_functions{ii}(:).bbwim); proj_lims(:, :, ii) = cat(1, self.shape_functions{ii}(:).bbwim);
end end
proj_lims = [min(proj_lims(:, 1, :), [], 3), max(proj_lims(:, 2, :), [], 3)]; proj_lims = [min(proj_lims(:, 1, :), [], 3), max(proj_lims(:, 2, :), [], 3)];
delta_omegas = proj_lims(:, 2) - proj_lims(:, 1) + 1; delta_omegas = proj_lims(:, 2) - proj_lims(:, 1) + 1;
else case 'none'
[delta_omegas, proj_lims] = self.sampler.get_omega_deviations(with_shape_functions); [delta_omegas, proj_lims] = self.sampler.get_omega_deviations();
delta_omegas = delta_omegas(sel_ref, :);
proj_lims = proj_lims(sel_ref, :);
end end
chosen_depts = max(blob_dephs, delta_omegas(self.sampler.selected)); chosen_depts = max(blob_dephs, delta_omegas);
num_ws = max(chosen_depts) + 2; num_ws = max(chosen_depts) + 2;
......
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