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

6D-reconstruction: updated to same volume_downscaling procedure as the other...

6D-reconstruction: updated to same volume_downscaling procedure as the other reconstruction routines

Signed-off-by: default avatarNicola Vigano <nicola.vigano@esrf.fr>
parent 3979e771
No related branches found
No related tags found
No related merge requests found
......@@ -45,15 +45,7 @@ function gtReconstructGrainExtended(grain_id, phase_id, parameters, varargin)
vols = algo.getCurrentSolution();
% Restoring initial volume size (depending on the rounding)
if (rec_opts.volume_downscaling > 1)
fprintf('Expanding volumes..')
c = tic();
vols = gtMathsUpsampleVolume(vols, rec_opts.volume_downscaling);
fprintf('\b\b: Done (%f seconds).\n', toc(c))
end
[avg_R_vecs, avg_R_vecs_int] = sampler.getAverageOrientations(vols);
[avg_R_vecs, avg_R_vecs_int, stddev_R_vecs] = sampler.getAverageOrientations(vols);
avg_R_vec = sampler.getAverageOrientation(vols);
s_g_odf = reshape(sampler.getODF(vols), rec_opts.grid_edge([1 1 1]));
......@@ -63,11 +55,21 @@ function gtReconstructGrainExtended(grain_id, phase_id, parameters, varargin)
[kam, gam] = gtDefComputeKernelAverageMisorientation(avg_R_vecs, avg_R_vecs_int);
[igm, gos] = gtDefComputeIntraGranularMisorientation(avg_R_vecs, avg_R_vecs_int, 'R_vector', gr.R_vector);
% Restoring initial volume size (depending on the rounding)
if (rec_opts.volume_downscaling > 1)
avg_R_vecs_int = gtMathsUpsampleVolume(avg_R_vecs_int, rec_opts.volume_downscaling);
avg_R_vecs = gtMathsUpsampleVolume(avg_R_vecs, rec_opts.volume_downscaling);
stddev_R_vecs = gtMathsUpsampleVolume(stddev_R_vecs, rec_opts.volume_downscaling);
kam = gtMathsUpsampleVolume(kam, rec_opts.volume_downscaling);
igm = gtMathsUpsampleVolume(igm, rec_opts.volume_downscaling);
end
ODF6D = struct( ...
'voxels_avg_R_vectors', {avg_R_vecs}, ...
'intensity', {avg_R_vecs_int}, ...
'shift', {shift}, ...
'R_vectors', {sampler.get_R_vectors()}, ...
'voxels_stddev_R_vectors', {stddev_R_vecs}, ...
'single_grain_ODF', {s_g_odf}, ...
'single_grain_avg_R_vector', {avg_R_vec}, ...
'kernel_average_misorientation', {kam}, ...
......
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