Skip to content
Snippets Groups Projects
Commit ea2d6574 authored by Lorenzo Valzania's avatar Lorenzo Valzania Committed by Nicola Vigano
Browse files

6D-Reconstruction: added orientation space oversize

parent 5a931ab6
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,8 @@ function par_rec = gtRecGrainsDefaultParameters(algo)
case {'6DL1', '6DTV', '6DTVL1'}
par_6D_rec_opts = struct( ...
'grid_edge', 7, 'super_sampling', 1, 'num_interp', 1, ...
'lambda', 1e-1, 'volume_downscaling', 1);
'lambda', 1e-1, 'volume_downscaling', 1, ...
'ospace_oversize', 1.1);
par_rec = struct(...
'algorithm', upper(algo), 'num_iter', 50, 'list', [], ...
'options', par_6D_rec_opts);
......
......@@ -10,12 +10,17 @@ function rec_opts = gtReconstruct6DGetParamenters(parameters)
|| isempty(rec_opts.volume_downscaling))
rec_opts.volume_downscaling = 1;
end
if (~isfield(rec_opts, 'ospace_oversize') ...
|| isempty(rec_opts.ospace_oversize))
rec_opts.ospace_oversize = 1.1;
end
else
warning('gtReconstruct6DGetParamenters:wrong_parameters', ...
'The rec.grains structure doesn''t seem to be valid. Falling back to defaults')
rec_opts = struct( ...
'grid_edge', 7, 'num_interp', 1, 'lambda', 1e-1, ...
'super_sampling', 1, 'volume_downscaling', 1 );
'super_sampling', 1, 'volume_downscaling', 1, ...
'ospace_oversize', 1.1 );
end
if (isfield(rec, 'grains'))
rec_opts.num_iter = rec.grains.num_iter;
......
......@@ -24,7 +24,7 @@ function gtReconstructGrainOrientation(grainID, phaseID, parameters)
rec_opts = gtReconstruct6DGetParamenters(parameters);
sampler = GtOrientationSampling(parameters, gr);
sampler.make_simple_grid_estim_ODF('cubic', rec_opts.grid_edge, false, 1.1);
sampler.make_simple_grid_estim_ODF('cubic', rec_opts.grid_edge, false, rec_opts.ospace_oversize);
if (rec_opts.super_sampling > 1)
sampler.make_supersampling_simple_grid([1 2 3], rec_opts.super_sampling);
end
......
......@@ -120,7 +120,11 @@ classdef GtOrientationSampling < handle
self.make_even_simple_grid(type, edge_points, gvdm_tmp, oversize);
end
else
self.make_simple_grid(type, edge_points, gvdm_tmp);
if (~exist('oversize', 'var'))
self.make_simple_grid(type, edge_points, gvdm_tmp);
else
self.make_simple_grid(type, edge_points, gvdm_tmp, oversize);
end
end
end
......@@ -134,13 +138,14 @@ classdef GtOrientationSampling < handle
disp(dstd)
disp(dcenters)
disp(dranges)
size_bb = (max(gvdm, [], 2) - min(gvdm, [], 2))';
fprintf('Orientation box sizes (deg): %f, %f, %f\n', 2 * atand(size_bb))
if (~exist('oversize', 'var'))
oversize = 1.1;
end
size_bb = (max(gvdm, [], 2) - min(gvdm, [], 2))' * oversize;
fprintf('Sampled orientation box sizes (deg): %f, %f, %f\n', 2 * atand(size_bb))
self.lattice = struct('gr', {});
self.gvdm = {};
......
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