Tabnine Logo
WritableRenderedImage.getTile
Code IndexAdd Tabnine to your IDE (free)

How to use
getTile
method
in
java.awt.image.WritableRenderedImage

Best Java code snippets using java.awt.image.WritableRenderedImage.getTile (Showing top 8 results out of 315)

origin: Geomatys/geotoolkit

if (renderedImage.getTile(rimtx, rimty).getDataBuffer().getDataType() != writableRI.getTile(wrimtx, wrimty).getDataBuffer().getDataType())
  throw new IllegalArgumentException("rendered image and writable rendered image haven't got same datas type");
origin: Geomatys/geotoolkit

  /**
   * Test result obtained from biLinear interpolation and a resampling.
   *
   * @throws NoninvertibleTransformException
   * @throws FactoryException
   * @throws TransformException
   */
  @Test
//    @Ignore
  public void jaiBiLinearTest() throws NoninvertibleTransformException, FactoryException, TransformException {

    setTargetImage(9, 9, DataBuffer.TYPE_DOUBLE,  -1000);
    setAffineMathTransform(MathTransforms.concatenate(pixelInCellCenter, new AffineTransform2D(3, 0, 0, 3, 0, 0), pixelInCellCenter.inverse()));

    /*
     * Resampling
     */
    final Resample resample = new Resample(mathTransform.inverse(), targetImage, sourceImg,
        InterpolationCase.BILINEAR, ResampleBorderComportement.FILL_VALUE, new double[]{0});
    resample.fillImage();
    final Raster coverageRaster = targetImage.getTile(0, 0);
    java.awt.image.DataBufferDouble datadouble = (java.awt.image.DataBufferDouble) coverageRaster.getDataBuffer();
    assertArrayEquals(BILINEAR_RESULT, datadouble.getData(0), 1E-9);
  }

origin: Geomatys/geotoolkit

final int tileX = XToTileX(x, tileXOff, tileWidth);
final int tileY = YToTileY(y, tileYOff, tileHeight);
final Raster top    = (tileY != minTileY) ? image.getTile(tileX, tileY-1) : null;
final Raster bottom = (tileY != maxTileY) ? image.getTile(tileX, tileY+1) : null;
final WritableRaster raster = image.getWritableTile(tileX, tileY);
try {
origin: Geomatys/geotoolkit

  /**
   * Test result obtained from neighBor interpolation and a resampling.
   *
   * @throws NoninvertibleTransformException
   * @throws FactoryException
   * @throws TransformException
   */
  @Test
//    @Ignore
  public void jaiNeighBorTest() throws NoninvertibleTransformException, FactoryException, TransformException {

    setTargetImage(9, 9, DataBuffer.TYPE_DOUBLE, -1000);
    setAffineMathTransform(MathTransforms.concatenate(pixelInCellCenter, new AffineTransform2D(3, 0, 0, 3, 0, 0), pixelInCellCenter.inverse()));

    /*
     * Resampling
     */
    Resample resample = new Resample(mathTransform.inverse(), targetImage, sourceImg,
        InterpolationCase.NEIGHBOR, ResampleBorderComportement.FILL_VALUE, new double[]{0});
    resample.fillImage();
    Raster coverageRaster = targetImage.getTile(0, 0);

    java.awt.image.DataBufferDouble datadouble = (java.awt.image.DataBufferDouble) coverageRaster.getDataBuffer();
    assertArrayEquals(NEIGHBOR_RESULT, datadouble.getData(0), 1E-9);
  }

origin: Geomatys/geotoolkit

if (renderedImage.getTile(rimtx, rimty).getDataBuffer().getDataType() != writableRI.getTile(wrimtx, wrimty).getDataBuffer().getDataType())
  throw new IllegalArgumentException("rendered image and writable rendered image haven't got same datas type");
origin: Geomatys/geotoolkit

  /**
   * Test result obtained from biLinear interpolation and a resampling and without any fillvalue.
   *
   * @throws NoninvertibleTransformException
   * @throws FactoryException
   * @throws TransformException
   */
  @Test
//    @Ignore
  public void withoutFillValueBiLinearTest() throws NoninvertibleTransformException, FactoryException, TransformException {

    setTargetImage(9, 9, DataBuffer.TYPE_DOUBLE,  -1000);
    setAffineMathTransform(MathTransforms.concatenate(pixelInCellCenter, new AffineTransform2D(3, 0, 0, 3, 0, 0), pixelInCellCenter.inverse()));

    /*
     * Resampling
     */
    final Resample resample = new Resample(mathTransform.inverse(), targetImage, sourceImg,
        InterpolationCase.BILINEAR, ResampleBorderComportement.FILL_VALUE, null);
    resample.fillImage();
    final Raster coverageRaster = targetImage.getTile(0, 0);
    java.awt.image.DataBufferDouble datadouble = (java.awt.image.DataBufferDouble) coverageRaster.getDataBuffer();
    assertArrayEquals(BILINEAR_RESULT_W_F, datadouble.getData(0), 1E-9);
  }

origin: Geomatys/geotoolkit

    InterpolationCase.BICUBIC, ResampleBorderComportement.FILL_VALUE, new double[]{0});
resample.fillImage();
final Raster coverageRaster = targetImage.getTile(0, 0);
origin: Geomatys/geotoolkit

final Raster coverageRaster = targetImage.getTile(0, 0);
java.awt.imageWritableRenderedImagegetTile

Popular methods of WritableRenderedImage

  • getWritableTile
  • getHeight
  • getMinX
  • getMinY
  • getWidth
  • releaseWritableTile
  • getMinTileX
  • getMinTileY
  • addTileObserver
  • getNumXTiles
  • getNumYTiles
  • getSampleModel
  • getNumYTiles,
  • getSampleModel,
  • getTileHeight,
  • getTileWidth,
  • removeTileObserver,
  • getTileGridXOffset,
  • getTileGridYOffset

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now