@Test(expected = NullPointerException.class) public void testPointRoiCoordinatesThrowsNPEIfRoiManagerNull() { RoiManagerUtil.pointROICoordinates(null); }
public static List<Vector3d> pointROICoordinates(final RoiManager manager) { final Roi[] rois = manager.getRoisAsArray(); return Arrays.stream(rois).filter(roi -> roi.getType() == Roi.POINT).map( roi -> { final int z = roi.getZPosition(); return Arrays.stream(roi.getContainedPoints()).distinct().map( p -> new Vector3d(p.x, p.y, z)); }).flatMap(s -> s).distinct().collect(Collectors.toList()); }
RoiManagerUtil { public static List<Vector3d> pointROICoordinates(final RoiManager manager) { final Roi[] rois = manager.getRoisAsArray(); return Arrays.stream(rois).filter(roi -> roi.getType() == Roi.POINT).map( roi -> { final int z = roi.getZPosition(); return Arrays.stream(roi.getContainedPoints()).distinct().map( p -> new Vector3d(p.x, p.y, z)); }).flatMap(s -> s).distinct().collect(Collectors.toList()); } }
RoiManagerUtil { public static List<Vector3d> pointROICoordinates(final RoiManager manager) { final Roi[] rois = manager.getRoisAsArray(); return Arrays.stream(rois).filter(roi -> roi.getType() == Roi.POINT).map( roi -> { final int z = roi.getZPosition(); return Arrays.stream(roi.getContainedPoints()).distinct().map( p -> new Vector3d(p.x, p.y, z)); }).flatMap(s -> s).distinct().collect(Collectors.toList()); } private  RoiManagerUtil(); }
RoiManagerUtil { public static List<Vector3d> pointROICoordinates(final RoiManager manager) { final Roi[] rois = manager.getRoisAsArray(); return Arrays.stream(rois).filter(roi -> roi.getType() == Roi.POINT).map( roi -> { final int z = roi.getZPosition(); return Arrays.stream(roi.getContainedPoints()).distinct().map( p -> new Vector3d(p.x, p.y, z)); }).flatMap(s -> s).distinct().collect(Collectors.toList()); } private  RoiManagerUtil(); static boolean isActiveOnAllSlices(final int sliceNumber); static List<Vector3d> pointROICoordinates(final RoiManager manager); }
RoiManagerUtil { public static List<Vector3d> pointROICoordinates(final RoiManager manager) { final Roi[] rois = manager.getRoisAsArray(); return Arrays.stream(rois).filter(roi -> roi.getType() == Roi.POINT).map( roi -> { final int z = roi.getZPosition(); return Arrays.stream(roi.getContainedPoints()).distinct().map( p -> new Vector3d(p.x, p.y, z)); }).flatMap(s -> s).distinct().collect(Collectors.toList()); } private  RoiManagerUtil(); static boolean isActiveOnAllSlices(final int sliceNumber); static List<Vector3d> pointROICoordinates(final RoiManager manager);  }