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

6D-Reconstruction: added code path to specify ospace-resolution on single grain reconstructions

parent 6e09b613
No related branches found
No related tags found
No related merge requests found
function gtReconstructGrainOrientation(grain_id, phase_id, parameters, rel_ospace_bb)
function gtReconstructGrainOrientation(grain_id, phase_id, parameters, varargin)
% gtReconstructGrainOrientation 6D reconstructions on a GPU machine
% gtAstraReconstructGrain(grainID, phaseID, [parameters])
% -------------------------------------------------------
......@@ -6,6 +6,11 @@ function gtReconstructGrainOrientation(grain_id, phase_id, parameters, rel_ospac
parameters = gtLoadParameters();
end
conf = struct( ...
'ospace_resolution', [], ...
'ospace_lims', [] );
[conf, ~] = parse_pv_pairs(conf, varargin);
rec_opts = gtReconstruct6DGetParamenters(parameters);
sample = GtSample.loadFromFile();
......@@ -31,15 +36,19 @@ function gtReconstructGrainOrientation(grain_id, phase_id, parameters, rel_ospac
if (is_extended)
bb_ors = gr.bb_ors;
ospace_bb = cat(1, bb_ors(:).R_vector);
elseif (exist('rel_ospace_bb', 'var') && ~isempty(rel_ospace_bb))
diff_r_vecs = tand(rel_ospace_bb / 2);
elseif (~isempty(conf.ospace_lims))
diff_r_vecs = tand(conf.ospace_lims / 2);
ospace_bb = [gr.R_vector + diff_r_vecs(1:3); gr.R_vector + diff_r_vecs(4:6)];
end
sampler = GtOrientationSampling(parameters, gr);
if (exist('ospace_bb', 'var') && ~isempty(ospace_bb))
% sampler.make_simple_grid('cubic', rec_opts.grid_edge, ospace_bb', 1)
sampler.make_even_simple_grid('cubic', rec_opts.grid_edge, ospace_bb', 1)
if (~isempty(conf.ospace_resolution))
sampler.make_res_simple_grid('cubic', conf.ospace_resolution, ospace_bb', rec_opts.ospace_oversize);
else
sampler.make_even_simple_grid('cubic', rec_opts.grid_edge, ospace_bb', 1)
end
else
sampler.make_simple_grid_estim_ODF('cubic', rec_opts.grid_edge, false, rec_opts.ospace_oversize);
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