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

6D-ODF: Improved visualization of ODF

parent 2a229f46
No related branches found
No related tags found
No related merge requests found
function gt6DPlotReconstructionODF(phase_id, grain_id)
function gt6DPlotReconstructionODF(phase_id, grain_id, percent)
grain_rec = gtLoadGrainRec(phase_id, grain_id);
if (~isfield(grain_rec, 'SEG'))
......@@ -30,9 +30,9 @@ function gt6DPlotReconstructionODF(phase_id, grain_id)
odf = gtGetODFFromGvdm(gv_dm(:, gv_mask), grid_points, gv_int(gv_mask));
f = figure();
ax1 = subplot(1, 3, 1, 'parent', f);
ax2 = subplot(1, 3, 2, 'parent', f);
ax3 = subplot(1, 3, 3, 'parent', f);
ax1 = subplot(3, 3, 1, 'parent', f);
ax2 = subplot(3, 3, 4, 'parent', f);
ax3 = subplot(3, 3, 7, 'parent', f);
imagesc(sum(odf, 3), 'parent', ax1);
imagesc(squeeze(sum(odf, 1)), 'parent', ax2);
......@@ -45,8 +45,20 @@ function gt6DPlotReconstructionODF(phase_id, grain_id)
colormap(ax2, gray);
colormap(ax3, gray);
ax4 = subplot(3, 3, [2 3 5 6 8 9], 'parent', f);
if (~exist('percent', 'var') || isempty(percent))
percent = 0.2;
end
thr_value = (max(odf(:)) - min(odf(:))) * percent + min(odf(:));
p = patch(isosurface(odf, thr_value), 'parent', ax4);
set(p, 'FaceColor', 'cyan', 'EdgeColor', 'none')
axis(ax4, 'tight')
camlight('right')
camlight('left')
lighting('gouraud')
set(f, 'Units', 'centimeters')
pos = get(f, 'Position');
pos(3) = pos(4) * 3;
pos(3:4) = pos(3:4) * 1.5;
set(f, 'position', pos);
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