@Override PolygonROI updateActiveHandleLocation(double xNew, double yNew, boolean shiftDown) { if (activeHandle == null) return roi; activeHandle.setLocation(xNew, yNew); roi = new PolygonROI(createPoint2List(handles), roi.getC(), roi.getZ(), roi.getT()); // System.out.println("UPDATED HANDLES: " + handles.size() + ", " + roi.nVertices()); return roi; }
@Override PointsROI updateActiveHandleLocation(double xNew, double yNew, boolean shiftDown) { if (activeHandle == null) return roi; activeHandle.setLocation(xNew, yNew); roi = new PointsROI(createPoint2List(handles), roi.getC(), roi.getZ(), roi.getT()); ensureHandlesUpdated(); activeHandle = grabHandle(xNew, yNew, Double.POSITIVE_INFINITY, shiftDown); // System.err.println("Calling: " + activeHandle + " - " + (handles == null ? 0 : handles.size())); return roi; }
@Override public double getBoundsHeight() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsHeight(); }
/** * Get the number of vertices used to represent this area. There is some 'fuzziness' to the meaning of this, since * curved regions will be flattened and the same complex areas may be represented in different ways - nevertheless * it provides some measure of the 'complexity' of the area. * @return */ @Override public int nVertices() { if (stats == null) calculateShapeMeasurements(); return stats.getNVertices(); }
@Override public double getPerimeter() { if (stats == null) calculateShapeMeasurements(); return stats.getPerimeter(); }
@Override public double getBoundsY() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsY(); }
@Override public double getBoundsWidth() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsWidth(); }
@Override public double getBoundsWidth() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsWidth(); }
@Override public double getBoundsHeight() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsHeight(); }
@Override public double getCentroidX() { if (stats == null) calculateShapeMeasurements(); return stats.getCentroidX(); }
@Override public double getPerimeter() { if (stats == null) calculateShapeMeasurements(); return stats.getPerimeter(); }
@Override public double getBoundsWidth() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsWidth(); }
@Override public double getArea() { if (stats == null) calculateShapeMeasurements(); return stats.getArea(); }
@Override public double getPerimeter() { if (stats == null) calculateShapeMeasurements(); return stats.getPerimeter(); }
@Override public double getBoundsY() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsY(); }
@Override public double getBoundsX() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsX(); }
@Override public double getBoundsY() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsY(); }
@Override public double getBoundsX() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsX(); }
public int nVertices() { if (stats == null) calculateShapeMeasurements(); return stats.getNVertices(); }
@Override public double getBoundsHeight() { if (stats == null) calculateShapeMeasurements(); return stats.getBoundsHeight(); }