Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function result_viewer = gtReconstructTestCase(test_data)
rec_opts = gtReconstruct6DGetParamenters(test_data.parameters);
gvdm = test_data.gv.dm;
gtGetMaxDisorientation(gvdm, [], 'diameter_average');
gtGetMaxDisorientation(gvdm, [], 'diameter_zero');
f = figure();
ax = axes('parent', f);
hold(ax, 'on')
scatter3(ax, gvdm(1, 1:10:end)', gvdm(2, 1:10:end)', gvdm(3, 1:10:end)', 20);
sampler = GtOrientationSampling(test_data.parameters, test_data.grain);
sampler.make_simple_grid_estim_ODF('cubic', rec_opts.grid_edge, false, 1); %rec_opts.ospace_oversize);
scatter3(ax, sampler.gvdm{1}(:, 1), sampler.gvdm{1}(:, 2), sampler.gvdm{1}(:, 3), 20, 'r');
drawnow();
ospace_bb = [min(gvdm, [], 2), max(gvdm, [], 2)];
sampler.make_even_simple_grid('cubic', rec_opts.grid_edge, ospace_bb, rec_opts.ospace_oversize);
scatter3(ax, sampler.gvdm{1}(:, 1), sampler.gvdm{1}(:, 2), sampler.gvdm{1}(:, 3), 20, 'g');
hold(ax, 'off')
drawnow();
if (rec_opts.super_sampling > 1)
sampler.make_supersampling_simple_grid([1 2 3], rec_opts.super_sampling);
end
[algo, good_or] = gtReconstruct6DLaunchAlgorithm(sampler, rec_opts, test_data.parameters);
vols = algo.getCurrentSolution();
result = gt6DAssembleResult(test_data, sampler, vols);
post_result = gt6DPostProcessOrientationSpread(test_data, result, true);
result_viewer = GtOrientationResultView(test_data, result, post_result);
end