public int getTileGridYOffset() { return adaptee.getTileGridYOffset(); }
/** * Constructs an <code>RasterLayout</code> with all its parameters set to equal those of a given * <code>RenderedImage</code>. * * @param im a <code>RenderedImage</code> whose layout will be copied. */ public RasterLayout(RenderedImage im) { this( im.getMinX(), im.getMinY(), im.getWidth(), im.getHeight(), im.getTileGridXOffset(), im.getTileGridYOffset(), im.getTileWidth(), im.getTileHeight()); }
/** * {@inheritDoc } */ @Override public int getTileGridYOffset() { return origin.getTileGridYOffset(); }
public int getTileGridYOffset() { return src.getTileGridYOffset(); }
public int getTileGridYOffset() { return src.getTileGridYOffset(); }
public int getTileGridYOffset() { return src.getTileGridYOffset(); }
public int getTileGridYOffset() { return src.getTileGridYOffset(); }
@Override public GridCoverage2D read(GeneralParameterValue[] parameters) throws IOException { GridCoverage2D originalCoverage = super.read(parameters); RenderedImage source = new ImageWorker(originalCoverage.getRenderedImage()) .format(DataBuffer.TYPE_USHORT) .getRenderedImage(); TiledImage shortImage = new TiledImage( source.getMinX(), source.getMinY(), source.getWidth(), source.getHeight(), source.getTileGridXOffset(), source.getTileGridYOffset(), source.getSampleModel(), null); shortImage.set(source); // force color model to be null, this also occurs in real cases GridCoverage2D coverage = CoverageFactoryFinder.getGridCoverageFactory(null) .create( originalCoverage.getName(), shortImage, originalCoverage.getEnvelope2D()); return coverage; } };
public RandomIterFallbackNoCacheNoArray(RenderedImage im, Rectangle bounds) { this.im = im; Rectangle imBounds = new Rectangle(im.getMinX(), im.getMinY(), im.getWidth(), im.getHeight()); this.boundsRect = imBounds.intersection(bounds); this.sampleModel = im.getSampleModel(); this.boundsX = boundsRect.x; this.boundsY = boundsRect.y; this.tileWidth = im.getTileWidth(); this.tileHeight = im.getTileHeight(); this.tileGridXOffset = im.getTileGridXOffset(); this.tileGridYOffset = im.getTileGridYOffset(); }
private static ImageLayout createImageLayout(RenderedImage source, ColorModel targetCM) { return new ImageLayout( source.getMinX(), source.getMinY(), source.getWidth(), source.getHeight(), source.getTileGridXOffset(), source.getTileGridYOffset(), source.getTileWidth(), source.getTileHeight(), targetCM.createCompatibleSampleModel(source.getWidth(), source.getHeight()), targetCM ); }
public RandomIterFallbackLocal(RenderedImage im, Rectangle bounds) { this.im = im; Rectangle imBounds = new Rectangle(im.getMinX(), im.getMinY(), im.getWidth(), im.getHeight()); this.boundsRect = imBounds.intersection(bounds); this.sampleModel = im.getSampleModel(); this.boundsX = boundsRect.x; this.boundsY = boundsRect.y; this.tileWidth = im.getTileWidth(); this.tileHeight = im.getTileHeight(); this.tileGridXOffset = im.getTileGridXOffset(); this.tileGridYOffset = im.getTileGridYOffset(); }
public RandomIterFallbackLocal(RenderedImage im, Rectangle bounds) { this.im = im; Rectangle imBounds = new Rectangle(im.getMinX(), im.getMinY(), im.getWidth(), im.getHeight()); this.boundsRect = imBounds.intersection(bounds); this.sampleModel = im.getSampleModel(); this.boundsX = boundsRect.x; this.boundsY = boundsRect.y; this.tileWidth = im.getTileWidth(); this.tileHeight = im.getTileHeight(); this.tileGridXOffset = im.getTileGridXOffset(); this.tileGridYOffset = im.getTileGridYOffset(); }
/** * Constructs an <code>RasterLayout</code> with all its parameters set to equal those of a given * <code>RenderedImage</code>. * * @param im a <code>RenderedImage</code> whose layout will be copied. */ public RasterLayout(RenderedImage im) { this( im.getMinX(), im.getMinY(), im.getWidth(), im.getHeight(), im.getTileGridXOffset(), im.getTileGridYOffset(), im.getTileWidth(), im.getTileHeight()); }
public RandomIterFallbackNoCacheNoArray(RenderedImage im, Rectangle bounds) { this.im = im; Rectangle imBounds = new Rectangle(im.getMinX(), im.getMinY(), im.getWidth(), im.getHeight()); this.boundsRect = imBounds.intersection(bounds); this.sampleModel = im.getSampleModel(); this.boundsX = boundsRect.x; this.boundsY = boundsRect.y; this.tileWidth = im.getTileWidth(); this.tileHeight = im.getTileHeight(); this.tileGridXOffset = im.getTileGridXOffset(); this.tileGridYOffset = im.getTileGridYOffset(); }
public ImageHeader(RenderedImage image, String tileFormat) { this(new ImageLayout(image.getMinX(), image.getMinY(), image.getWidth(), image.getHeight(), image.getTileGridXOffset(), image.getTileGridYOffset(), image.getTileWidth(), image.getTileHeight(), image.getSampleModel(), image.getColorModel()), tileFormat); }
private static ImageLayout layoutHelper(RenderedImage source, float originX, float originY, float width, float height) { Rectangle bounds = new Rectangle2D.Float(originX, originY, width, height).getBounds(); return new ImageLayout(bounds.x, bounds.y, bounds.width, bounds.height, source .getTileGridXOffset(), source.getTileGridYOffset(), source.getTileWidth(), source .getTileHeight(), source.getSampleModel(), source.getColorModel()); }
private static ImageLayout layoutHelper(RenderedImage source, float originX, float originY, float width, float height) { Rectangle bounds = new Rectangle2D.Float(originX, originY, width, height).getBounds(); return new ImageLayout(bounds.x, bounds.y, bounds.width, bounds.height, source .getTileGridXOffset(), source.getTileGridYOffset(), source.getTileWidth(), source .getTileHeight(), source.getSampleModel(), source.getColorModel()); }
private static ImageLayout layoutHelper(RenderedImage source, float originX, float originY, float width, float height) { Rectangle bounds = new Rectangle2D.Float(originX, originY, width, height).getBounds(); return new ImageLayout(bounds.x, bounds.y, bounds.width, bounds.height, source .getTileGridXOffset(), source.getTileGridYOffset(), source.getTileWidth(), source .getTileHeight(), source.getSampleModel(), source.getColorModel()); }
boolean contains(final int x, final int y) { if (combinedMaskImage == null) { return true; } final int tileW = combinedMaskImage.getTileWidth(); final int tileH = combinedMaskImage.getTileHeight(); final int tileX = PlanarImage.XToTileX(x, combinedMaskImage.getTileGridXOffset(), tileW); final int tileY = PlanarImage.YToTileY(y, combinedMaskImage.getTileGridYOffset(), tileH); final Raster tile = combinedMaskImage.getTile(tileX, tileY); return tile.getSample(x, y, 0) != 0; }
/** Set source */ private void setDefaults(RenderedImage imgsrc) { // override the params in the super class setSuperProperties(); tilingMode = MODE_EXPLICIT; if (imgsrc != null) { this.imgsrc = imgsrc; tileGridXOffset = imgsrc.getTileGridXOffset(); tileGridYOffset = imgsrc.getTileGridYOffset(); tileWidth = imgsrc.getTileWidth(); tileHeight = imgsrc.getTileHeight(); tilingSet = true; numTiles = imgsrc.getNumXTiles() * imgsrc.getNumYTiles(); numComponents = imgsrc.getSampleModel().getNumBands(); } setDefaults(); }