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

gtReconstruct6DLaunchAlgorithm: updated to allow for passing extra arguments (like an ODF)

parent edf84ac9
No related branches found
No related tags found
No related merge requests found
function [algo, good_or] = gtReconstruct6DLaunchAlgorithm(sampler, rec_opts, parameters, det_index)
% FUNCTION algo = gtReconstruct6DLaunchAlgorithm(sampler, rec_opts, parameters, det_index)
function [algo, good_or] = gtReconstruct6DLaunchAlgorithm(sampler, rec_opts, parameters, varargin)
% FUNCTION algo = gtReconstruct6DLaunchAlgorithm(sampler, rec_opts, parameters, varargin)
%
if (~exist('det_index', 'var') || isempty(det_index))
det_index = 1;
end
conf = struct('det_index', 1, 'ODF', []);
conf = parse_pv_pairs(conf, varargin);
rec_factory = Gt6DReconstructionAlgorithmFactory(parameters, ...
'volume_downscaling', rec_opts.volume_downscaling, ...
......@@ -12,7 +11,7 @@ function [algo, good_or] = gtReconstruct6DLaunchAlgorithm(sampler, rec_opts, par
'rspace_oversize', rec_opts.rspace_oversize, ...
'use_predicted_scatter_ints', rec_opts.use_predicted_scatter_ints, ...
'shape_functions_type', rec_opts.shape_functions_type, ...
'det_index', det_index );
'det_index', conf.det_index );
num_interp = rec_opts.num_interp;
if (num_interp < 0)
......@@ -23,6 +22,9 @@ function [algo, good_or] = gtReconstruct6DLaunchAlgorithm(sampler, rec_opts, par
[algo, good_or] = rec_factory.getReconstructionAlgo(sampler, num_interp);
% Adding extra parameters/constraints
algo.ODF = conf.ODF;
geom_memory = sum(arrayfun(@(x)x.get_memory_consumption_geometry(), sampler));
grain_memory = sum(arrayfun(@(x)x.get_memory_consumption_graindata(), sampler));
......
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