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

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

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

origin: it.geosolutions.jaiext.iterators/jt-iterators

/**
 * Constructs and returns an instance of WritableRandomIter suitable for iterating over the given bounding rectangle within the given
 * WritableRenderedImage source. If the bounds parameter is null, the entire image will be used.
 * 
 * @param im a WritableRenderedImage source.
 * @param bounds the bounding Rectangle for the iterator, or null.
 * @return a WritableRandomIter allowing read/write access to the source.
 */
public static WritableRandomIter createWritable(WritableRenderedImage im, Rectangle bounds) {
  if (bounds == null) {
    bounds = new Rectangle(im.getMinX(), im.getMinY(), im.getWidth(), im.getHeight());
  }
  return new WritableRandomIterFallback(im, bounds);
}
origin: geosolutions-it/jai-ext

/**
 * Constructs and returns an instance of WritableRandomIter suitable for iterating over the given bounding rectangle within the given
 * WritableRenderedImage source. If the bounds parameter is null, the entire image will be used.
 * 
 * @param im a WritableRenderedImage source.
 * @param bounds the bounding Rectangle for the iterator, or null.
 * @return a WritableRandomIter allowing read/write access to the source.
 */
public static WritableRandomIter createWritable(WritableRenderedImage im, Rectangle bounds) {
  if (bounds == null) {
    bounds = new Rectangle(im.getMinX(), im.getMinY(), im.getWidth(), im.getHeight());
  }
  return new WritableRandomIterFallback(im, bounds);
}
origin: geosolutions-it/jai-ext

public void runScriptWithBuilder(String script, String destVar, WritableRenderedImage destImage) 
    throws JiffleException {
  
  // Image bounds are taken from the destination image
  Rectangle imageBounds = new Rectangle(
      destImage.getMinX(), destImage.getMinY(),
      destImage.getWidth(), destImage.getHeight());
  
  // The world bounds are the unit rectangle
  Rectangle2D worldBounds = new Rectangle2D.Double(0, 0, 1, 1);
  
  CoordinateTransform transform = CoordinateTransforms.unitBounds(imageBounds);
  
  JiffleBuilder builder = new JiffleBuilder();
  
  // Set the processing area (world units)
  builder.worldAndNumPixels(worldBounds, destImage.getWidth(), destImage.getHeight());
  
  // Set the script and the destination image with its transform
  builder.script(script).dest(destVar, destImage, transform);
  
  // This executes the script and writes the results into destImage
  builder.run();
}
// docs end builder method
origin: geosolutions-it/jai-ext

public void createRipplesImage(WritableRenderedImage destImg) {
  // image dimensions
  final int width = destImg.getWidth();
  final int height = destImg.getHeight();
  // first pixel coordinates
  int x = destImg.getMinX();
  int y = destImg.getMinY();
  // center pixel coordinates
  final int xc = x + destImg.getWidth() / 2;
  final int yc = y + destImg.getHeight() / 2;
  // constant term
  double C = Math.PI * 8;
  WritableRectIter iter = RectIterFactory.createWritable(destImg, null);
  do {
    double dy = ((double) (y - yc)) / yc;
    do {
      double dx = ((double) (x - xc)) / xc;
      double d = Math.sqrt(dx * dx + dy * dy);
      iter.setSample(Math.sin(d * C));
      x++ ;
    } while (!iter.nextPixelDone());
    x = destImg.getMinX();
    y++;
    iter.startPixels();
  } while (!iter.nextLineDone());
}
// docs-end-method
origin: geosolutions-it/jai-ext

    destImage.getWidth(), destImage.getHeight());
runtimeObj.setWorldByNumPixels(worldBounds, destImage.getWidth(), destImage.getHeight());
origin: apache/sis

input.getMinY()   != output.getMinY()  ||
input.getWidth()  != output.getWidth() ||
input.getHeight() != output.getHeight())
origin: Geomatys/geotoolkit

|| writableRI.getHeight()!= areaIterateMaxY-areaIterateMinY//largeuriteration
|| !minTileX || !minTileY )
|| renderedImage.getMinY()   != writableRI.getMinY()
|| renderedImage.getWidth()  != writableRI.getWidth()
|| renderedImage.getHeight() != writableRI.getHeight()
|| rimtx != wrimtx || rimty != wrimty
|| renderedImage.getNumXTiles() != writableRI.getNumXTiles()
origin: Geomatys/geotoolkit

|| renderedImage.getMinY()   != writableRI.getMinY()
|| renderedImage.getWidth()  != writableRI.getWidth()
|| renderedImage.getHeight() != writableRI.getHeight()
|| renderedImage.getSampleModel().getNumBands() != writableRI.getSampleModel().getNumBands())
throw new IllegalArgumentException("rendered image and writable rendered image dimensions are not conform.\n" +
origin: Geomatys/geotoolkit

final int ymin   = image.getMinY();
final int width  = image.getWidth();
final int height = image.getHeight();
final Rectangle bounds = new Rectangle(xmin, ymin, width, height);
if (bounds.isEmpty()) {
java.awt.imageWritableRenderedImagegetHeight

Popular methods of WritableRenderedImage

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

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best plugins for Eclipse
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