diff --git a/zUtil_Deformation/GtGrainODFwSolver.m b/zUtil_Deformation/GtGrainODFwSolver.m index fe9ae474f5e863b6fca7dab7eb1bdb72095ddf46..f7bbf6b6ae1b4f9a5196ca0563914fefd48c58b1 100644 --- a/zUtil_Deformation/GtGrainODFwSolver.m +++ b/zUtil_Deformation/GtGrainODFwSolver.m @@ -65,7 +65,7 @@ classdef GtGrainODFwSolver < handle % 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)) case 'sirt' @@ -104,7 +104,8 @@ classdef GtGrainODFwSolver < handle end 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); blob_dephs = arrayfun(@(x)size(x.intm, 3), bls); @@ -112,18 +113,20 @@ classdef GtGrainODFwSolver < handle blob_lims = cat(1, bls(:).bbwim); - with_shape_functions = ~isempty(self.shape_functions); - if (with_shape_functions) - for ii = numel(self.shape_functions):-1:1 - proj_lims(:, :, ii) = cat(1, self.shape_functions{ii}(:).bbwim); - end - proj_lims = [min(proj_lims(:, 1, :), [], 3), max(proj_lims(:, 2, :), [], 3)]; + switch(self.shape_functions_type) + case 'w' + for ii = numel(self.shape_functions):-1:1 + proj_lims(:, :, ii) = cat(1, self.shape_functions{ii}(:).bbwim); + end + proj_lims = [min(proj_lims(:, 1, :), [], 3), max(proj_lims(:, 2, :), [], 3)]; - delta_omegas = proj_lims(:, 2) - proj_lims(:, 1) + 1; - else - [delta_omegas, proj_lims] = self.sampler.get_omega_deviations(with_shape_functions); + delta_omegas = proj_lims(:, 2) - proj_lims(:, 1) + 1; + case 'none' + [delta_omegas, proj_lims] = self.sampler.get_omega_deviations(); + delta_omegas = delta_omegas(sel_ref, :); + proj_lims = proj_lims(sel_ref, :); end - chosen_depts = max(blob_dephs, delta_omegas(self.sampler.selected)); + chosen_depts = max(blob_dephs, delta_omegas); num_ws = max(chosen_depts) + 2;