Skip to content

Commit

Permalink
change dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Nov 30, 2024
1 parent 321475d commit 7abb47f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/ai/nets/samj/ij/ui/Consumer.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,30 +249,30 @@ private List<Rectangle> getRectRoisFromRoiManager() {
}

@Override
public List<long[]> getPointRoisOnFocusImage() {
public List<int[]> getPointRoisOnFocusImage() {
Roi roi = IJ.getImage().getRoi();
List<long[]> list = getPointRoisFromRoiManager();
List<int[]> list = getPointRoisFromRoiManager();
if (roi == null)
return list;
if (roi.getType() != Roi.POINT)
return list;
while (roi.iterator().hasNext()) {
java.awt.Point p = roi.iterator().next();
list.add(new long[] {(long) p.getX(), (long) p.getY()});
list.add(new int[] {(int) p.getX(), (int) p.getY()});
}
return list;
}

private List<long[]> getPointRoisFromRoiManager() {
List<long[]> list = new ArrayList<long[]>();
private List<int[]> getPointRoisFromRoiManager() {
List<int[]> list = new ArrayList<int[]>();
Roi[] rois = RoiManager.getInstance().getRoisAsArray();
if (rois.length == 0)
return list;
List<Roi> roiList = Arrays.stream(rois).filter(rr -> rr.getType() != Roi.POINT).collect(Collectors.toList());
for (Roi rr : roiList) {
while (rr.iterator().hasNext()) {
java.awt.Point p = rr.iterator().next();
list.add(new long[] {(long) p.getX(), (long) p.getY()});
list.add(new int[] {(int) p.getX(), (int) p.getY()});
}
}
return list;
Expand Down

0 comments on commit 7abb47f

Please sign in to comment.