-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewParent.m
69 lines (56 loc) · 2 KB
/
viewParent.m
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
function out = viewParent( sid, rid, region, ebsd, tasks, varargin ) %#ok<INUSL>
% View information about austenite parent.
%
%
% Syntax
% out = viewParent( sid, rid, region, ebsd, tasks, varargin )
%
% Output
% out - output data {'prnOri', op} or {'frgInfo', frg_info}
%
% Input
% sid - sample id: 's01', 's02', 's03', 's04', 't01', 'p01', 'p02'
% rid - region id
% region - region coordinate
% ebsd - EBSD (all phases) data if 0, try load useing function "[sid '_load']"
% tasks - list of tasks
%
% History
% 26.03.14 Original implementation.
% 05.04.14 New output system.
varargin = [varargin tasks];
ORmat = get_option(varargin, 'optOR', getOR('KS'));
if isa(ORmat, 'cell')
ORmat = getRegionParams(sid, rid, ORmat, 'singleArray' );
end
ORmat = getOR(ORmat);
if ~check_option(tasks, 'realRecon')
param = get_option(tasks,'ParentRecParam', [0.4, 2, 6, 5, 1.5]);
[ cr, w1, vv, w2, PRmin ] = getRegionParams(sid, rid, param );
op = fishParent(ebsd, ORmat, cr, sid, rid, w1, vv, w2, PRmin);
out = {'prnOri', mean(op)};
else
param = get_option(tasks,'ParentRecParam', [0.1, 3*degree, 6, 1.4, 4*degree, 6*degree, 0*degree, 10*degree,]);
options = get_option(tasks,'ParentRecParam', {'NeighborsOrder', 1, 'onlyFirst', 'combineClose', 'NOuseWeightFunc', 'refineOri'});
cr = param(1);
thr = param(2);
Nv = param(3);
PRm = param(4);
w0 = param(5);
w11 = param(6);
w12 = param(7);
w2 = param(8);
ebsd = CIFilter(ebsd, cr);
grains = getGrains(ebsd, 2*degree, 2);
[ frg_info ] = findPriorGrains(grains, ORmat, thr, Nv, PRm, w0, w11, w12, w2,options{:});
colorFragments(grains, frg_info{1});
figure;
plotpdf(frg_info{2},Miller(1,0,0),'antipodal');
frg_info{2}
figure;
plotpdf(getVariants(frg_info{2}, getOR('M1'), symmetry('m-3m')),Miller(1,0,0),'antipodal');
figure;
plotpdf(get(grains,'mean'),Miller(1,0,0),'antipodal');
out = {'frgInfo', frg_info};
end
end