@Override public double semiAxisLength(final int d) { if (d != 0 && d != 1) throw new IllegalArgumentException( "Invalid dimension " + d); return d == 0 ? oval.getFloatWidth() / 2 : oval.getFloatHeight() / 2; }
@Override public void updateBounds() { // Updates ImageJ 1.x OvalRoi position final double x = position[0] - oval.getFloatWidth() / 2; final double y = position[1] - oval.getFloatHeight() / 2; oval.setLocation(x, y); }
@Override public double realMax(final int d) { if (d != 0 && d != 1) throw new IllegalArgumentException( "Invalid dimension " + d); return d == 0 ? oval.getXBase() + oval.getFloatWidth() : oval.getYBase() + oval.getFloatHeight(); }