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

gtShowFsim: fixed bug related to the recent changes in fwd_sim datastructure

parent 23cefd06
No related branches found
No related tags found
No related merge requests found
......@@ -72,13 +72,14 @@ if (~isfield(grain, 'fwd_sim')) % for older versions of forward simulation
grain.fwd_sim(app.det_index).check = grain.check;
grain.fwd_sim(app.det_index).flag = grain.flag;
grain.fwd_sim(app.det_index).difspotID = grain.spotid(grain.proj(app.det_index).included);
grain.fwd_sim(app.det_index).uvw = [grain.uv_exp, grain.om_exp];
elseif (~isfield(grain.fwd_sim, 'difspotID'))
if (isfield(grain, 'difspotidA') && isfield(grain, 'difspotidB'))
grain.fwd_sim(app.det_index).difspotID = [grain.difspotidA, grain.difspotidB];
else
grain.fwd_sim(app.det_index).difspotID = grain.spotid(grain.proj(app.det_index).included);
end
elseif (~isfield(grain, 'difspotID'))
elseif (~isfield(grain.fwd_sim, 'difspotID'))
gtError('', 'Missing field ''difspotID'' in grain... Quitting')
end
......@@ -101,7 +102,7 @@ end
if (~isfield(grain, 'full') || isempty(grain.full))
if (isfield(grain, 'fwd_sim'))
bb = grain.fwd_sim(app.det_index).bb(grain.proj(app.det_index).included, :);
bb = grain.fwd_sim(app.det_index).bb;
else
bb = grain.bb_exp;
end
......@@ -1148,7 +1149,7 @@ if (strcmpi(get(h_fig, 'SelectionType'), 'normal'))
% finds in the DB intersection btw centroid XYImage and fsim candidate
% positions (xyz) using tolerances passed by tol
if (isfield(grain, 'fwd_sim'))
uvw_exp = grain.fwd_sim(det_index).uvw(grain.proj(det_index).included, :);
uvw_exp = grain.fwd_sim(det_index).uvw;
else
uvw_exp = [grain.uv_exp, grain.om_exp];
end
......@@ -1588,7 +1589,7 @@ function sfUpdateFullImage(hObj, ~)
% get correspondng bbox from DB
if (isfield(grain, 'fwd_sim'))
bb = grain.fwd_sim(det_index).bb(included, :);
bb = grain.fwd_sim(det_index).bb;
ids = grain.fwd_sim(det_index).difspotID;
else
bb = grain.bb_exp;
......
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