/** * Fills the region connected to the specified start pixel. * A pixel belongs to this region if there is a path between it and the starting * pixel which passes only through pixels of value {@code v} within the range * {@code refValue - tolerance <= v <= refValue + tolerance}. * * @param x start pixel x coordinate * * @param y start pixel y coordinate * * @param fillValue the value to write to the destination image for this region * * @param refValue the source image reference value for the region * * @return a new {@linkplain FillResult} */ public FillResult fill(int x, int y, int fillValue, double refValue) { return fillRadius(x, y, fillValue, refValue, Double.NaN); }
/** * Fills the region connected to the specified start pixel and lying within * {@code radius} pixels of the start pixel. * <p> * A pixel belongs to this region if there is a path between it and the starting * pixel which passes only through pixels of value {@code v} within the range * {@code start_pixel_value - tolerance <= v <= start_pixel_value + tolerance}. * * @param x start pixel x coordinate * * @param y start pixel y coordinate * * @param fillValue the value to write to the destination image for this region * * @param radius maximum distance (pixels) that a candidate pixel can be from * the start pixel * * @return a new {@linkplain FillResult} */ public FillResult fillRadius(int x, int y, int fillValue, double radius) { return fillRadius(x, y, fillValue, srcIter.getSampleDouble(x, y, srcBand), radius); }