/** 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). */ 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(); }
public void run() { WritableRectIter writer = RectIterFactory.createWritable(oi, rect); writer.startLines(); int y = rect.y; while (!writer.finishedLines()) { writer.startPixels(); int x = rect.x; while (!writer.finishedPixels()) { final Coordinate realPos = trans.gridToWorldCoordinate(x, y); final double retVal = interpolator.getValue(realPos); writer.setSample(0, retVal); updateStatistics(retVal); writer.nextPixel(); x++; } writer.nextLine(); y++; } } }
public void run() { WritableRectIter writer = RectIterFactory.createWritable(oi, rect); writer.startLines(); int y = rect.y; while (!writer.finishedLines()) { writer.startPixels(); int x = rect.x; while (!writer.finishedPixels()) { final Coordinate realPos = trans.gridToWorldCoordinate(x, y); final double retVal = interpolator.getValue(realPos); writer.setSample(0, retVal); updateStatistics(retVal); writer.nextPixel(); x++; } writer.nextLine(); y++; } } }
public GridCoverage2D execute(GridCoverage2D inputGc) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitTPI(writer, pos); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("TPI", outputImage); }
public GridCoverage2D execute(GridCoverage2D inputGc) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitRoughness(writer, pos); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("Roughness", outputImage); }
public GridCoverage2D execute(GridCoverage2D inputGc) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitAspect(writer, pos); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("Aspect", outputImage); }
public GridCoverage2D execute(GridCoverage2D inputGc) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitTRI(writer, pos); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("TRI", outputImage); }
public GridCoverage2D execute(GridCoverage2D inputGc, SlopeType slopeType, double zFactor) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitSlope(writer, pos, slopeType, zFactor); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("Slope", outputImage); }
public GridCoverage2D execute(GridCoverage2D inputGc, double azimuth, double altitude, double zFactor) { this.initSurface(inputGc); DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitHillShade(writer, pos, azimuth, altitude, zFactor); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("Aspect", outputImage); }
public GridCoverage2D execute(GridCoverage2D inputGc, double zFactor) { this.initSurface(inputGc); xL2 = CellSizeX * CellSizeX; x2L = 2.0 * CellSizeX; yL2 = CellSizeY * CellSizeY; y2L = 2.0 * CellSizeY; DiskMemImage outputImage = this.createDiskMemImage(inputGc, RasterPixelType.FLOAT); WritableRectIter writer = RectIterFactory.createWritable(outputImage, outputImage.getBounds()); GridCoordinates2D pos = new GridCoordinates2D(); int y = bounds.y; writer.startLines(); while (!writer.finishedLines()) { int x = bounds.x; writer.startPixels(); while (!writer.finishedPixels()) { pos.setLocation(x, y); visitCurvature(writer, pos, zFactor); writer.nextPixel(); x++; } writer.nextLine(); y++; } return createGridCoverage("Curvature", outputImage); }
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); }