Examples of Raster


Examples of ae.java.awt.image.Raster

                                        (int) xform.getTranslateY());
            return;
        }

        // General case: cobble the necessary region into a single Raster
        Raster raster = img.getData(region);

        // Make a new Raster with the same contents as raster
        // but starting at (0, 0).  This raster is thus in the same
        // coordinate system as the SampleModel of the original raster.
        WritableRaster wRaster =
              Raster.createWritableRaster(raster.getSampleModel(),
                                          raster.getDataBuffer(),
                                          null);

        // If the original raster was in a different coordinate
        // system than its SampleModel, we need to perform an
        // additional translation in order to get the (minX, minY)
        // pixel of raster to be pixel (0, 0) of wRaster.  We also
        // have to have the correct width and height.
        int minX = raster.getMinX();
        int minY = raster.getMinY();
        int width = raster.getWidth();
        int height = raster.getHeight();
        int px = minX - raster.getSampleModelTranslateX();
        int py = minY - raster.getSampleModelTranslateY();
        if (px != 0 || py != 0 || width != wRaster.getWidth() ||
            height != wRaster.getHeight()) {
            wRaster =
                wRaster.createWritableChild(px,
                                            py,
View Full Code Here

Examples of ca.eandb.jmist.framework.Raster

   * @see ca.eandb.jmist.framework.ParallelizableJob#submitTaskResults(java.lang.Object, java.lang.Object, ca.eandb.util.progress.ProgressMonitor)
   */
  public void submitTaskResults(Object task, Object results, ProgressMonitor monitor) {

    Cell  cell  = (Cell) task;
    Raster  pixels  = (Raster) results;

    /* Write the submitted results to the raster. */
    display.setPixels(cell.x, cell.y, pixels);

    /* Update the progress monitor. */
 
View Full Code Here

Examples of chunmap.data.feature.Raster

  }

  @Override
  protected void subRender(Symbol smb,int i, Renderer r) {

    Raster raster = null;
    try {
      raster = dataSource.getImage(r.getViewEnvelop(), r.getWidth(), r.getHeight());
    } catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of com.google.code.appengine.awt.image.Raster

     * Callback for getting a next scanline
     * @param scanline scan line number
     */
    @SuppressWarnings("unused")
    private void getScanLine(int scanline) {
        Raster child = sourceRaster.createChild(srcXOff,
                srcYOff + scanline * deltaY, srcWidth, 1, 0, 0, null);

        scanRaster.setRect(child);
        // broadcast the current percentage of image completion
        processImageProgress((float) scanline / (float) srcHeight * 100.0f);
 
View Full Code Here

Examples of com.jgraph.gaeawt.java.awt.image.Raster

        int w = srcX + width < srcW ? width : srcW - srcX;
        int h = srcY + height < srcH ? height : srcH - srcY;

        ColorModel srcCM = srcSurf.getColorModel();
        Raster srcR = srcSurf.getRaster().createChild(0, 0, w, h, null);

        ColorModel dstCM = dstSurf.getColorModel();
        WritableRaster dstR = dstSurf.getRaster();

        transformedBlit(srcCM, srcR, 0, 0, dstCM, dstR, dstX, dstY, w,
View Full Code Here

Examples of de.timefinder.data.set.Raster

            if (ass.getStart() >= 0)
                throw new IllegalStateException("at this point assignments' start cannot be positive:" + ass);
            // 3 b) The order limits the search interval:
            int searchInterval[] = currentWeek.getSearchInterval(ass);
            if (searchInterval != null) {
                Raster raster = conflictMatrix.getConflictingRaster(ass);

                // Step 4: Place Event in a timeslot or put it into
                // the unassigned array, if adding was not successfull
                int duration = ass.getEvent().getDuration();
                for (int startTime = raster.getNextFree(searchInterval[0], duration);
                        startTime >= 0 && startTime < searchInterval[1];
                        startTime = raster.getNextFree(startTime + 1, duration)) {

                    if (currentWeek.add(ass, startTime)) {
                        assigned = true;
//                        logger.info("\n\n\n#################################################");
//                        logger.info(ass);
View Full Code Here

Examples of de.timefinder.data.set.Raster

        matrix.add(ev1);
        matrix.add(ev2);

        // test if combinedRaster of ev2 works
        Raster combinedRaster = matrix.getConflictingRaster(ev2);
        assertEquals(5, combinedRaster.getNextFree(0, 1));
        assertEquals(6, combinedRaster.getNextFree(0, 2));
        assertEquals(7, combinedRaster.getNextFree(7, 2));

        // test if remove works
        matrix.remove(ev1);
        assertSame(combinedRaster, matrix.getConflictingRaster(ev2));
        assertEquals(0, combinedRaster.getNextFree(0, 1));
        assertEquals(1, combinedRaster.getNextFree(1, 1));

        // test if bitRaster is included and combinedRaster recognizes ev1
        Raster combinedRasterEv1 = matrix.getConflictingRaster(ev1);
        assertEquals(9, combinedRasterEv1.getNextFree(8, 1));
        assertEquals(-1, combinedRasterEv1.getNextFree(7, 2));
    }
View Full Code Here

Examples of java.awt.image.Raster

        rgb.getHeight(),
        BufferedImage.TYPE_INT_RGB);
    DataBufferInt dbi = new DataBufferInt(
        rgb.getData(),
        rgb.getHeight() * rgb.getWidth());
    Raster r = Raster.createRaster(
        im.getSampleModel(),
        dbi,
        null);
    im.setData(r);
    return im;
View Full Code Here

Examples of java.awt.image.Raster

     * @param rect the region to extract from image.
     */

    protected void getTilePixels(Rectangle rect) {
        // Grab the pixels
        Raster src = image.getData(rect);
        int col = (int) rect.getX();
        int row = (int) rect.getY();
        int rows = (int) rect.getHeight();
        int cols = (int) rect.getWidth();
        src.getPixels(col, row, cols, rows, _pixels);
    }
View Full Code Here

Examples of java.awt.image.Raster

      Integer key = new Integer( parallelPos );
      Object o =  childRasterCache.get( key );
      if ( o !=null ) return (Raster) o;
      else {
        Raster r;
        if ( info.isVertical ) r = raster.createChild( 0, parallelPos, this.perpendicularLength, info.parallelLength-parallelPos, 0, 0, null );
        else r = raster.createChild( parallelPos, 0, info.parallelLength-parallelPos, this.perpendicularLength, 0, 0, null );
        childRasterCache.put( key, r );
                                //System.out.println( "Storing child raster in cache. Position: " + Integer.toString(parallelPos) );
        return r;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.