/** * Sets the iterator to the next band in the image, and returns {@code true} if the max band has * been exceeded. */ public boolean nextBandDone() { boolean check = src.nextBandDone(); if (check == dst.nextBandDone()) { return check; } throw new RasterFormatException(ERROR); }
/** * Positions an image iterator at the specified band. * * @param iter the iterator * @param targetBand the band */ private void moveIterToBand(RectIter iter, int targetBand) { int iband = 0; iter.startBands(); while(iband < targetBand && !iter.nextBandDone()) { iband++; } if(iband != targetBand) { throw new IllegalArgumentException("Band " + targetBand + " not found, max band is " + iband); } }
/** * Positions an image iterator at the specified band. * * @param iter the iterator * @param targetBand the band */ private void moveIterToBand(RectIter iter, int targetBand) { int iband = 0; iter.startBands(); while(iband < targetBand && !iter.nextBandDone()) { iband++; } if(iband != targetBand) { throw new IllegalArgumentException("Band " + targetBand + " not found, max band is " + iband); } }
/** * Sets the iterator to the next band in the image, and returns * true if the max band has been exceeded. */ public boolean nextBandDone() { int skip = sourceBands[bandIndex]; if (++bandIndex >= sourceBands.length) { return true; } skip = sourceBands[bandIndex] - skip; if (skip < 0) { iterator.startBands(); skip = sourceBands[bandIndex]; } while (--skip >= 0) { if (iterator.nextBandDone()) { return true; } } return false; }
/** * Sets the iterator to the next band in the image, * and returns {@code true} if the max band has been exceeded. */ public boolean nextBandDone() { boolean check = src.nextBandDone(); if (check == dst.nextBandDone()) { return check; } throw new RasterFormatException(ERROR); }
/** * Sets the iterator to the next band in the image, * and returns {@code true} if the max band has been exceeded. */ public boolean nextBandDone() { boolean check = src.nextBandDone(); if (check == dst.nextBandDone()) { return check; } throw new RasterFormatException(ERROR); }
/** * Sets the iterator to the next band in the image, * and returns {@code true} if the max band has been exceeded. * * @return {@code true} if the iteration over bands is finished. */ @Override public boolean nextBandDone() { boolean check = src.nextBandDone(); if (check == dst.nextBandDone()) { return check; } throw new RasterFormatException(ERROR); }
} while (!iterator.nextBandDone()); out.flush(); processImageComplete();
} while (!iterator.nextLineDone()); iterator.startLines(); } while (!iterator.nextBandDone());
} while (!iterator.nextBandDone());
} while (!iSrc0.nextBandDone() && !iSrc1.nextBandDone() && !iTarget.nextBandDone());
} while (!iSrc0.nextBandDone() && !iSrc1.nextBandDone() && !iTarget.nextBandDone());
} while (!iterator.nextBandDone());
/** * Ensures that all sample values in every bands are either inside the given range, * or {@link Double#NaN}. * * @param minimum The lower bound of the range, inclusive. * @param maximum The upper bound of the range, inclusive. * @param image The image to test. * * @since 3.19 */ public static void assertSampleValuesInRange(final double minimum, final double maximum, final RenderedImage image) { final RectIter it = RectIterFactory.create(image, null); if (!it.finishedLines()) do { if (!it.finishedPixels()) do { if (!it.finishedBands()) do { final double value = it.getSampleDouble(); assertBetween("Sample value", minimum, maximum, value); } while (!it.nextBandDone()); it.startBands(); } while (!it.nextPixelDone()); it.startPixels(); } while (!it.nextLineDone()); }
assertEquals(pe, pa, SAMPLE_TOLERANCE); a.nextBand(); } while (!e.nextBandDone()); assertTrue(a.finishedBands()); a.nextPixel();