Skip to content
Snippets Groups Projects
Commit 42b9852e authored by Yoann Guilhem's avatar Yoann Guilhem Committed by Nicola Vigano
Browse files

Cleaning: redundant function

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@1010 4c865b51-4357-4376-afb4-474e03ccb993
parent bec2774b
No related branches found
No related tags found
No related merge requests found
function [pgood,grainoutput]=gtFindGroupInCand_sab(cand,tol,sample,ACM,spacegroup)
% cand: all the lines that possibly belong to the same grain as the 1st line
% (they are pair-consistent)
% 1st line in "cand" is the actual line investigated
% NOTE: p2 and p3 intersection might be far from the actual grain center if
% they are near being parallel
% keyboard
nof_cand=length(cand.id);
p1=1;
for p2=2:nof_cand % loop to find a 2nd line of the grain
for p3=p2+1:nof_cand % loop to find a 3rd line of the grain
% p2
% p3
pgood=false(nof_cand,1);
pgood([p1,p2])=true;
% Assume p2 belong to p1, try a 3rd one:
% is p1,p2,p3 group-consistent?
ok=gtTryAddLineToGroup(p3,pgood,cand,tol,sample,ACM);
if ok
pgood(p3)=true; % p1,p2,p3 are group consistent
for p4=p3+1:nof_cand
% p4
% having a group of p1,p2,p3 does p4 fit as well?
ok=gtTryAddLineToGroup(p4,pgood,cand,tol,sample,ACM)
if ok
% p1,p2,p3,p4 are group-consistent.
% We accept them as a good solution.
% Which else could belong to this group?
% Loop through all the remaining candidates and try whether they
% fit. Keep the result, that is all the lines from this grain.
pgood(p4)=true;
for pn=p4+1:nof_cand
% ACM
ok=gtTryAddLineToGroup(pn,pgood,cand,tol,sample,ACM);
if ok
pgood(pn)=true;
end
end
grainl=gtKeepLine(pgood,cand); % lines in the grain
% grainoutput=gtIndexCreateGrainOutputBuild(grainl); %,spacegroup);
% grainoutput=gtIndexCreateGrainOutput(grainl,ACM);
% end modif sabine
return
end
end
end
end
end
% If no grain is found:
pgood=false(nof_cand,1);
pgood(1)=true;
grainoutput=[];
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