Package javax.media.jai

Examples of javax.media.jai.Interpolation


/*     */       }
/*     */
/* 496 */       args.set(filter, 2);
/*     */     }
/*     */
/* 499 */     Interpolation interp = (Interpolation)args.getObjectParameter(3);
/*     */
/* 502 */     if ((!(interp instanceof InterpolationNearest)) && (!(interp instanceof InterpolationBilinear)) && (!(interp instanceof InterpolationBicubic)) && (!(interp instanceof InterpolationBicubic2)))
/*     */     {
/* 506 */       msg.append(getName() + " " + JaiI18N.getString("FilteredSubsampleDescriptor2"));
/*     */
View Full Code Here


/*     */       {
/*  78 */         return Image.UndefinedProperty;
/*     */       }
/*  80 */       ROI srcROI = (ROI)property;
/*     */
/*  83 */       Interpolation interp = (Interpolation)pb.getObjectParameter(4);
/*     */
/*  86 */       Rectangle srcBounds = null;
/*  87 */       PlanarImage dst = op.getRendering();
/*  88 */       if (((dst instanceof GeometricOpImage)) && (((GeometricOpImage)dst).getBorderExtender() == null))
/*     */       {
/*  90 */         srcBounds = new Rectangle(src.getMinX() + interp.getLeftPadding(), src.getMinY() + interp.getTopPadding(), src.getWidth() - interp.getWidth() + 1, src.getHeight() - interp.getHeight() + 1);
/*     */       }
/*     */       else
/*     */       {
/*  96 */         srcBounds = new Rectangle(src.getMinX(), src.getMinY(), src.getWidth(), src.getHeight());
/*     */       }
View Full Code Here

/*     */   {
/*  70 */     ImageLayout layout = RIFUtil.getImageLayoutHint(hints);
/*     */
/*  73 */     AffineTransform transform = (AffineTransform)args.getObjectParameter(0);
/*     */
/*  75 */     Interpolation interp = (Interpolation)args.getObjectParameter(1);
/*  76 */     double[] backgroundValues = (double[])args.getObjectParameter(2);
/*     */
/*  78 */     RenderedImage source = args.getRenderedSource(0);
/*     */
/*  80 */     if ((!MediaLibAccessor.isMediaLibCompatible(args, layout)) || (!MediaLibAccessor.hasSameNumBands(args, layout)) || (source.getTileWidth() >= 32768) || (source.getTileHeight() >= 32768))
View Full Code Here

/*     */       {
/*  78 */         return Image.UndefinedProperty;
/*     */       }
/*  80 */       ROI srcROI = (ROI)property;
/*     */
/*  83 */       Interpolation interp = (Interpolation)pb.getObjectParameter(2);
/*     */
/*  86 */       Rectangle srcBounds = null;
/*  87 */       PlanarImage dst = op.getRendering();
/*  88 */       if (((dst instanceof GeometricOpImage)) && (((GeometricOpImage)dst).getBorderExtender() == null))
/*     */       {
/*  90 */         srcBounds = new Rectangle(src.getMinX() + interp.getLeftPadding(), src.getMinY() + interp.getTopPadding(), src.getWidth() - interp.getWidth() + 1, src.getHeight() - interp.getHeight() + 1);
/*     */       }
/*     */       else
/*     */       {
/*  96 */         srcBounds = new Rectangle(src.getMinX(), src.getMinY(), src.getWidth(), src.getHeight());
/*     */       }
View Full Code Here

/*  73 */     float x_center = paramBlock.getFloatParameter(0);
/*  74 */     float y_center = paramBlock.getFloatParameter(1);
/*  75 */     float angle = paramBlock.getFloatParameter(2);
/*     */
/*  77 */     Object arg1 = paramBlock.getObjectParameter(3);
/*  78 */     Interpolation interp = (Interpolation)arg1;
/*     */
/*  80 */     double[] backgroundValues = (double[])paramBlock.getObjectParameter(4);
/*     */
/*  82 */     SampleModel sm = source.getSampleModel();
/*  83 */     boolean isBinary = ((sm instanceof MultiPixelPackedSampleModel)) && (sm.getSampleSize(0) == 1) && ((sm.getDataType() == 0) || (sm.getDataType() == 1) || (sm.getDataType() == 3));
View Full Code Here

/* 289 */     RenderableImage source = paramBlock.getRenderableSource(0);
/*     */
/* 291 */     float x_center = paramBlock.getFloatParameter(0);
/* 292 */     float y_center = paramBlock.getFloatParameter(1);
/* 293 */     float angle = paramBlock.getFloatParameter(2);
/* 294 */     Interpolation interp = (Interpolation)paramBlock.getObjectParameter(3);
/*     */
/* 302 */     int dangle = 0;
/* 303 */     double tmp_angle = 180.0F * angle / 3.141592653589793D;
/* 304 */     double rnd_angle = Math.round(tmp_angle);
/*     */
View Full Code Here

/*     */
/*  69 */     float xTrans = paramBlock.getFloatParameter(2);
/*  70 */     float yTrans = paramBlock.getFloatParameter(3);
/*     */
/*  72 */     Object arg1 = paramBlock.getObjectParameter(4);
/*  73 */     Interpolation interp = (Interpolation)arg1;
/*     */
/*  75 */     double[] backgroundValues = (double[])paramBlock.getObjectParameter(5);
/*     */
/*  78 */     AffineTransform tr = new AffineTransform();
/*     */
View Full Code Here

        ////
        //
        // Interpolation
        //
        ////
        final Interpolation interpolation;
        if (parameters.getObjectParameter("interpolation") != null){
            interpolation = (Interpolation) parameters.getObjectParameter("interpolation");
        }else if (hints.get(JAI.KEY_INTERPOLATION) != null){
            interpolation = (Interpolation) hints.get(JAI.KEY_INTERPOLATION);
        }
View Full Code Here

     * for the {@code "Resample"} operation.
     */
    @SuppressWarnings("unchecked")
    public Coverage doOperation(final ParameterValueGroup parameters, final Hints hints) {
        final GridCoverage2D source = (GridCoverage2D) parameters.parameter("Source").getValue();
        final Interpolation interpolation = ImageUtilities.toInterpolation(
                parameters.parameter("InterpolationType").getValue());
        CoordinateReferenceSystem targetCRS = (CoordinateReferenceSystem)
                parameters.parameter("CoordinateReferenceSystem").getValue();
        if (targetCRS == null) {
            targetCRS = source.getCoordinateReferenceSystem();
View Full Code Here


  @Override
  protected RenderedImage createRenderedImage(ParameterBlockJAI parameters, RenderingHints hints) {
    final RenderedImage source = (RenderedImage) parameters.getSource(0);
    final Interpolation interpolation;
    if(parameters.getObjectParameter("interpolation")!=null)
      interpolation=(Interpolation) parameters.getObjectParameter("interpolation");
    else
      if(hints.get(JAI.KEY_INTERPOLATION)!=null)
        interpolation=(Interpolation) hints.get(JAI.KEY_INTERPOLATION);
View Full Code Here

TOP

Related Classes of javax.media.jai.Interpolation

Copyright © 2018 www.massapicom. 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.