/** Sets the iterator to the next pixel in image (that is, move rightward). */ public void nextPixel() { src.nextPixel(); dst.nextPixel(); }
} while (!e.nextBandDone()); assertTrue(a.finishedBands()); a.nextPixel(); a.startBands(); e.startBands();
/** * Sets the iterator to the next pixel in image (that is, move rightward). */ public void nextPixel() { src.nextPixel(); dst.nextPixel(); }
/** * Sets the iterator to the next pixel in image (that is, move rightward). */ public void nextPixel() { src.nextPixel(); dst.nextPixel(); }
/** * Sets the iterator to the next pixel in image (that is, move rightward). */ @Override public void nextPixel() { src.nextPixel(); dst.nextPixel(); }
sumOfVals += sampleValue; readIter.nextPixel();
private void extractValues() { coordinates.clear(); int column = bounds.x; int row = bounds.y + currentRow; readIter.startPixels(); while (!readIter.finishedPixels()) { double sampleValue = readIter.getSampleDouble(bandIndex); if (retainNoData) { Coordinate coord = trans.gridToWorldCoordinate(column, row); coord.z = sampleValue; coordinates.add(coord); } else { if (!SSUtils.compareDouble(noData, sampleValue)) { Coordinate coord = trans.gridToWorldCoordinate(column, row); coord.z = sampleValue; coordinates.add(coord); } } column++; readIter.nextPixel(); } currentRow++; readIter.nextLine(); }
private void extractValues() { coordinates.clear(); int column = bounds.x; int row = bounds.y + currentRow; readIter.startPixels(); while (!readIter.finishedPixels()) { double sampleValue = readIter.getSampleDouble(bandIndex); if (retainNoData) { Coordinate coord = trans.gridToWorldCoordinate(column, row); coord.z = sampleValue; coordinates.add(coord); } else { if (!SSUtils.compareDouble(noData, sampleValue)) { Coordinate coord = trans.gridToWorldCoordinate(column, row); coord.z = sampleValue; coordinates.add(coord); } } column++; readIter.nextPixel(); } currentRow++; readIter.nextLine(); }
aSqDist[dy][dx] = INT_ZERO; readIter.nextPixel(); dx++;
public void visit(GridCoverage2D inputCoverage, Integer bandIndex) { reset(); PlanarImage inputImage = (PlanarImage) inputCoverage.getRenderedImage(); RectIter readIter = RectIterFactory.create(inputImage, inputImage.getBounds()); readIter.startLines(); while (!readIter.finishedLines()) { readIter.startPixels(); while (!readIter.finishedPixels()) { double sampleValue = readIter.getSampleDouble(bandIndex); visit(Double.valueOf(sampleValue)); readIter.nextPixel(); } readIter.nextLine(); } }
inputIter.nextPixel(); writerIter.nextPixel();
for (int x = 0; x < WIDTH; x++) { assertEquals((double)x + y, iter.getSampleDouble(), TOL); iter.nextPixel();
iterator.nextPixel();
public GridCoverage2D execute(GridCoverage2D inputGc, double[] fuzzyValues) { DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); PlanarImage inputImage = (PlanarImage) inputGc.getRenderedImage(); final double inputNoData = RasterHelper.getNoDataValue(inputGc); this.NoData = RasterHelper.getDefaultNoDataValue(PixelType); RectIter inputIter = RectIterFactory.create(inputImage, inputImage.getBounds()); WritableRectIter writerIter = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); inputIter.startLines(); writerIter.startLines(); while (!inputIter.finishedLines() && !writerIter.finishedLines()) { inputIter.startPixels(); writerIter.startPixels(); while (!inputIter.finishedPixels() && !writerIter.finishedPixels()) { final double inputVal = inputIter.getSampleDouble(0); if (SSUtils.compareDouble(inputNoData, inputVal)) { writerIter.setSample(0, NoData); } else { double fuzzyValue = getFuzzyValue(inputVal, fuzzyValues) * maxRange; writerIter.setSample(0, fuzzyValue); updateStatistics(inputVal); } inputIter.nextPixel(); writerIter.nextPixel(); } inputIter.nextLine(); writerIter.nextLine(); } return createGridCoverage("Fuzzy", outputImage); }
inputIter.nextPixel(); writerIter.nextPixel();