Skip to content
Snippets Groups Projects
Commit a015da85 authored by Zheheng Liu's avatar Zheheng Liu
Browse files

calculate KAM and IGM by gtMathsRodSum.


Signed-off-by: default avatarZheheng Liu <zheheng.liu@esrf.fr>
parent fbc0442b
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ function [igm, gos] = gtDefComputeIntraGranularMisorientation(dmvol, intvol, var
avg_R_vec = reshape(conf.R_vector, 3, 1);
end
igm = abs(gvdm - avg_R_vec(:, ones(tot_voxels, 1)));
igm = gtMathsRodSum(gvdm, -avg_R_vec(:, ones(tot_voxels, 1)));
igm = sqrt(sum(igm .^ 2, 1));
igm(intvol == 0) = 0;
% so we get all the orientation differences (Intra-Granular Misorientation)
......
......@@ -76,10 +76,12 @@ function dists = compute_ang_dists_map(dmvol, valid_vol, incrx, incry, incrz, sy
dists = gtDisorientation(gvdm_1, gvdm_2, symm_ops, 'mode', 'active');
dists = reshape(dists, dmvol_size(1:3)) .* valid_diffs;
else
diffs = dmvol(inds_x_1, inds_y_1, inds_z_1, :) ...
- dmvol(inds_x_2, inds_y_2, inds_z_2, :);
[gvdm_1, dmvol_size] = gtDefDmvol2Gvdm(dmvol(inds_x_1, inds_y_1, inds_z_1, :));
[gvdm_2, ~] = gtDefDmvol2Gvdm(dmvol(inds_x_2, inds_y_2, inds_z_2, :));
dists = sqrt(sum(diffs .^ 2, 4));
dists = 2 * atand(dists .* valid_diffs);
diffs = gtMathsRodSum(gvdm_1, -gvdm_2);
dists = sqrt(sum(diffs .^ 2, 1));
dists = reshape(dists, dmvol_size(1:3)) .* valid_diffs;
dists = 2 * atand(dists);
end
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