Examples of BorderExtenderConstant


Examples of com.lightcrafts.mediax.jai.BorderExtenderConstant

        // Extend the sources filling with the minimum possible value
        // on account of the threshold technique.
        this.sourceExtender =
            sourceExtensionConstant == 0.0 ?
            BorderExtender.createInstance(BorderExtender.BORDER_ZERO) :
            new BorderExtenderConstant(new double[] {sourceExtensionConstant});

        // Extends alpha or ROI data with zeros.
        if(sourceAlpha != null || sourceROI != null) {
            this.zeroExtender =
                BorderExtender.createInstance(BorderExtender.BORDER_ZERO);
View Full Code Here

Examples of javax.media.jai.BorderExtenderConstant

        // Extend the sources filling with the minimum possible value
        // on account of the threshold technique.
        this.sourceExtender =
            sourceExtensionConstant == 0.0 ?
            BorderExtender.createInstance(BorderExtender.BORDER_ZERO) :
            new BorderExtenderConstant(new double[] {sourceExtensionConstant});

        // Extends alpha or ROI data with zeros.
        if(sourceAlpha != null || sourceROI != null) {
            this.zeroExtender =
                BorderExtender.createInstance(BorderExtender.BORDER_ZERO);
View Full Code Here

Examples of javax.media.jai.BorderExtenderConstant

   * @param borderType
   */
  public void addBorder(int thickness, Color color, int borderTypethrows ExpressionException{
   
    double colorArray[] = {color.getRed(), color.getGreen(), color.getBlue()};
    BorderExtender borderExtender = new BorderExtenderConstant(colorArray);
   
    ParameterBlock params = new ParameterBlock();
    params.addSource(image());
    params.add(thickness);
    params.add(thickness);
View Full Code Here

Examples of javax.media.jai.BorderExtenderConstant

          params.add(y);
          params.add(angle);
          params.add(interp);
          params.add(new double[] { 0.0 });
          RenderingHints hints= new RenderingHints(RenderingHints.KEY_INTERPOLATION,(RenderingHints.VALUE_INTERPOLATION_BICUBIC));
          hints.add(new RenderingHints(JAI.KEY_BORDER_EXTENDER,new BorderExtenderConstant(new double[] { 255.0 })));
          hints.add(new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,Boolean.TRUE));
          alpha = JAI.create("rotate", params, hints).getAsBufferedImage();
      }
     
      ParameterBlock params = new ParameterBlock();
      params.addSource(image());
      params.add(x);
      params.add(y);
      params.add(angle);
      params.add(interp);
      params.add(new double[] { 0.0 });
      BorderExtender extender= new BorderExtenderConstant(new double[] { 0.0 });
      RenderingHints hints= new RenderingHints(JAI.KEY_BORDER_EXTENDER, extender);
      hints.add(new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, Boolean.TRUE));
      image(JAI.create("rotate", params, hints).getAsBufferedImage());
      if (alpha != null)image(addAlpha(image(), alpha, 0, 0));
    }
View Full Code Here

Examples of javax.media.jai.BorderExtenderConstant

/*      */     case 5:
/*      */     default:
/*  361 */       sourceExtensionConstant = -1.797693134862316E+308D;
/*      */     }
/*      */
/*  366 */     this.sourceExtender = (sourceExtensionConstant == 0.0D ? BorderExtender.createInstance(0) : new BorderExtenderConstant(new double[] { sourceExtensionConstant }));
/*      */
/*  372 */     if ((sourceAlpha != null) || (sourceROI != null)) {
/*  373 */       this.zeroExtender = BorderExtender.createInstance(0);
/*      */     }
/*      */
View Full Code Here

Examples of javax.media.jai.BorderExtenderConstant

        default:
            sourceExtensionConstant = -Double.MAX_VALUE;
        }
        this.sourceExtender = sourceExtensionConstant == 0.0 ? BorderExtender
                .createInstance(BorderExtender.BORDER_ZERO)
                : new BorderExtenderConstant(new double[] { sourceExtensionConstant });

        roiAccessor = buildRoiAccessor(sourceROI);
        thresholdRoiAccessor = buildRoiAccessor(thresholdRoi);
    }
View Full Code Here

Examples of javax.media.jai.BorderExtenderConstant

        block.addSource(image);
        block.add(Math.abs(xPaddingSx));
        block.add(Math.abs(0));
        block.add(Math.abs(yPaddingTop));
        block.add(Math.abs(0));
        block.add(new BorderExtenderConstant(new double[]{Double.NaN}));
        RenderedOp paddedImage = JAI.create("Border", block);

        block = new ParameterBlock();
        block.addSource(paddedImage);
        block.add((float) -xPaddingSx);
View Full Code Here

Examples of javax.media.jai.BorderExtenderConstant

        //
        // We have yet to check for it usefulness: it might be more convenient
        // to check for region overlapping and return a nodata value by hand,
        // so to avoid problems with interpolation at source raster borders.
        //
        BorderExtender extender = new BorderExtenderConstant(new double[] { nodata });
       
        return new GridCoverage2DRIA(src, dst, vectorize(src.getRenderedImage()), imageLayout,
                null, false, extender, Interpolation.getInstance(Interpolation.INTERP_NEAREST),
                new double[] { nodata });
    }
View Full Code Here

Examples of javax.media.jai.BorderExtenderConstant

        //
        // We have yet to check for it usefulness: it might be more convenient
        // to check for region overlapping and return a nodata value by hand,
        // so to avoid problems with interpolation at source raster borders.
        //
        BorderExtender extender = new BorderExtenderConstant(new double[] { nodata });

        return new GridCoverage2DRIA(src, dst.getGridGeometry(), vectorize(src.getRenderedImage()), imageLayout,
                null, false, extender, Interpolation.getInstance(Interpolation.INTERP_NEAREST),
                new double[] { nodata });
    }
View Full Code Here

Examples of javax.media.jai.BorderExtenderConstant

        //
        // We have yet to check for it usefulness: it might be more convenient
        // to check for region overlapping and return a nodata value by hand,
        // so to avoid problems with interpolation at source raster borders.
        //
        BorderExtender extender = new BorderExtenderConstant(new double[] { nodata });

        return new GridCoverage2DRIA(src, dst, vectorize(src.getRenderedImage()), imageLayout,
                null, false, extender, Interpolation.getInstance(Interpolation.INTERP_NEAREST),
                new double[] { nodata });
    }
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.