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

6D-Reconstruction: add possibility to manually restrict orientation space

parent ec66edf0
No related branches found
No related tags found
No related merge requests found
function gtReconstructGrainOrientation(grainID, phaseID, parameters)
function gtReconstructGrainOrientation(grainID, phaseID, parameters, rel_ospace_bb)
% gtReconstructGrainOrientation 6D reconstructions on a GPU machine
% gtAstraReconstructGrain(grainID, phaseID, [parameters])
% -------------------------------------------------------
......@@ -24,7 +24,13 @@ 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, rec_opts.ospace_oversize);
if (~exist('rel_ospace_bb', 'var') || isempty(rel_ospace_bb))
sampler.make_simple_grid_estim_ODF('cubic', rec_opts.grid_edge, false, rec_opts.ospace_oversize);
else
diff_r_vecs = tand(rel_ospace_bb / 2);
ospace_bb = [gr.R_vector + diff_r_vecs(1:3); gr.R_vector + diff_r_vecs(4:6)];
sampler.make_even_simple_grid('cubic', rec_opts.grid_edge, ospace_bb', 1)
end
if (rec_opts.super_sampling > 1)
sampler.make_supersampling_simple_grid([1 2 3], rec_opts.super_sampling);
end
......@@ -41,9 +47,11 @@ function gtReconstructGrainOrientation(grainID, phaseID, parameters)
fprintf('\b\b: Done (%f seconds).\n', toc(c))
end
or_sizes = sampler.get_orientation_sampling_size();
[avg_R_vecs, avg_R_vecs_int] = sampler.getAverageOrientations(vols, good_or);
avg_R_vec = sampler.getAverageOrientation(vols, good_or);
s_g_odf = reshape(sampler.getODF(vols, good_or), rec_opts.grid_edge([1 1 1]));
s_g_odf = reshape(sampler.getODF(vols, good_or), or_sizes{1});
vol_size = size(avg_R_vecs_int);
shift = gtFwdSimComputeVolumeShifts(gr.proj, parameters, vol_size);
......
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