Skip to content

Commit

Permalink
Fix exception thrown by Fiji
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoube committed Mar 6, 2012
1 parent 369a046 commit 00afe9b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/org/doube/bonej/pqct/selectroi/RoiSelector.java
Expand Up @@ -391,17 +391,19 @@ boolean guessFlipSelection(Vector<DetectedEdge> edges, int selection,boolean sta


/*DetectedEdge*/
int selectRoiBiggestBoneDetectedEdges(Vector<DetectedEdge> edges){
Vector<DetectedEdge> temp = new Vector<DetectedEdge>();
for (int iii =0;iii<edges.size();++iii){
temp.add(edges.get(iii));
}
Collections.sort(temp);
int counter=0;
while (edges.get(counter).area !=temp.get(temp.size()-1).area){
++counter;
private int selectRoiBiggestBoneDetectedEdges(Vector<DetectedEdge> edges){
int counter = 0;
int maxArea = 0;
int maxPos = 0;

Iterator<DetectedEdge> it = edges.iterator();
while (it.hasNext()){
if (it.next().area > maxArea)
maxPos = counter;
counter++;
}
return counter;

return maxPos;
}

/*DetectedEdge*/
Expand Down

0 comments on commit 00afe9b

Please sign in to comment.