Package javax.media.jai

Examples of javax.media.jai.ParameterBlockJAI.addSource()


          new LinearColorMapElement[] { c0, c1, c3, c4, c5, c6 },
          new LinearColorMapElement[] { c7 });

      final ParameterBlockJAI pbj = new ParameterBlockJAI(
          RasterClassifier.OPERATION_NAME);
      pbj.addSource(image);
      pbj.setParameter("Domain1D", list);
      final RenderedOp finalimage = JAI.create(
          RasterClassifier.OPERATION_NAME, pbj);

      if (TestData.isInteractiveTest())
View Full Code Here


          new LinearColorMapElement[] { c0, c1, c3, c4, c5, c6 },
          new LinearColorMapElement[] { c7 });

      final ParameterBlockJAI pbj = new ParameterBlockJAI(
          RasterClassifier.OPERATION_NAME);
      pbj.addSource(image);
      pbj.setParameter("Domain1D", list);
      final RenderedOp finalimage = JAI.create(
          RasterClassifier.OPERATION_NAME, pbj);

      if (TestData.isInteractiveTest())
View Full Code Here

          new LinearColorMapElement[] { c0, c1, c3, c4, c5 },
          new LinearColorMapElement[] { c6 });

      final ParameterBlockJAI pbj = new ParameterBlockJAI(
          RasterClassifier.OPERATION_NAME);
      pbj.addSource(image);
      pbj.setParameter("Domain1D", list);
      final RenderedOp finalimage = JAI.create(
          RasterClassifier.OPERATION_NAME, pbj);

      if (TestData.isInteractiveTest())
View Full Code Here

      assertEquals(list.getName().toString(), "testSWAN");
      assertNotNull(c0.toString());
     
      final ParameterBlockJAI pbj = new ParameterBlockJAI(
          RasterClassifier.OPERATION_NAME);
      pbj.addSource(image);
      pbj.setParameter("Domain1D", list);

      try {
        // //
        // forcing a bad band selection ...
View Full Code Here

          new LinearColorMapElement[] { nodata }, new Color(0,0,0,0));
   

      final ParameterBlockJAI pbj = new ParameterBlockJAI(
          RasterClassifier.OPERATION_NAME);
      pbj.addSource(image);
      pbj.setParameter("Domain1D", list);

      try {
        // //
        // forcing a bad band selection ...
View Full Code Here

            layout.setTileHeight(tileHeight);

            final RenderingHints hints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout);

            for (RenderedImage img : transformed) {
                mosaicParams.addSource(img);
                log.appendLoggingGeometries(LoggingHelper.MOSAIC_RESULT, img);
            }
            log.log(LoggingHelper.MOSAIC_RESULT);

            LOGGER.fine("Creating mosaic out of " + queries.size() + " raster tiles");
View Full Code Here

      final RenderingHints newHints = new RenderingHints(JAI.KEY_TILE_CACHE,scaleTC);
      newHints.add(ImageUtilities.DONT_REPLACE_INDEX_COLOR_MODEL);
     
      // using filtered subsample operator to do a subsampling
      final ParameterBlockJAI pb = new ParameterBlockJAI("filteredsubsample");
      pb.addSource(src);
      pb.setParameter("scaleX", new Integer(downsampleStep));
      pb.setParameter("scaleY", new Integer(downsampleStep));
      pb.setParameter("qsFilterArray", lowPassFilter);
      pb.setParameter("Interpolation", new InterpolationNearest());
      return JAI.create("filteredsubsample", pb,newHints);
View Full Code Here

      final RenderingHints newHints = new RenderingHints(JAI.KEY_TILE_CACHE,scaleTC);
      newHints.add(ImageUtilities.DONT_REPLACE_INDEX_COLOR_MODEL);
      newHints.add(new RenderingHints(JAI.KEY_BORDER_EXTENDER, borderExtender));
      // using filtered subsample operator to do a subsampling
      final ParameterBlockJAI pb = new ParameterBlockJAI("SubsampleAverage");
      pb.addSource(src);
      pb.setParameter("scaleX", new Double(1.0 / downsampleStep));
      pb.setParameter("scaleY", new Double(1.0 / downsampleStep));
      return JAI.create("SubsampleAverage", pb, newHints);
    }
View Full Code Here

            fail();
        } catch (IllegalArgumentException expected) {
            // This is the expected exception: source required.
        }

        param.addSource(dummy);
        try {
            JAI.create(SampleTranscoder.OPERATION_NAME, param);
            fail();
        } catch (IllegalArgumentException expected) {
            // This is the expected exception: parameter required.
View Full Code Here

       JAI.getDefaultInstance().getOperationRegistry().
             getDescriptor(OperationDescriptor.class, "org.geotools.ColorReduction"));
        ParameterBlockJAI pbj = new ParameterBlockJAI("org.geotools.ColorReduction");
        // I will tile the image in 4 tiles and force parallelism here
        JAI.getDefaultInstance().getTileScheduler().setParallelism(4);
        pbj.addSource(
            new ImageWorker(image).
              setRenderingHint(JAI.KEY_IMAGE_LAYOUT,
                       new ImageLayout(image).setTileGridXOffset(0).setTileGridYOffset(0).setTileHeight(64).setTileWidth(64)
            ).tile().getRenderedImage()
        );
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.