Package javax.media.jai

Examples of javax.media.jai.Interpolation


/*     */     }
/*     */
/*  84 */     BorderExtender extender = RIFUtil.getBorderExtenderHint(hints);
/*     */
/*  86 */     Warp warp = (Warp)args.getObjectParameter(0);
/*  87 */     Interpolation interp = (Interpolation)args.getObjectParameter(1);
/*  88 */     double[] backgroundValues = (double[])args.getObjectParameter(2);
/*     */
/*  90 */     int filter = -1;
/*  91 */     if ((interp instanceof InterpolationNearest))
/*  92 */       filter = 0;
View Full Code Here


/*     */
/*     */   public RenderedImage create(ParameterBlock args, RenderingHints hints)
/*     */   {
/*  70 */     ImageLayout layout = RIFUtil.getImageLayoutHint(hints);
/*     */
/*  72 */     Interpolation interp = (Interpolation)args.getObjectParameter(4);
/*     */
/*  74 */     RenderedImage source = args.getRenderedSource(0);
/*     */
/*  76 */     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(1);
/*     */
/*  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

/* 82 */         return Image.UndefinedProperty;
/*    */       }
/*    */
/* 88 */       TransposeType transposeType = (TransposeType)pb.getObjectParameter(0);
/*    */
/* 90 */       Interpolation interp = Interpolation.getInstance(0);
/*    */
/* 94 */       return new ROI(JAI.create("transpose", srcROI.getAsImage(), transposeType));
/*    */     }
/*    */
/* 98 */     return Image.UndefinedProperty;
View Full Code Here

/*     */       {
/*  78 */         return Image.UndefinedProperty;
/*     */       }
/*  80 */       ROI srcROI = (ROI)property;
/*     */
/*  83 */       Interpolation interp = (Interpolation)pb.getObjectParameter(3);
/*     */
/*  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

/*     */   public RenderedImage create(ParameterBlock paramBlock, RenderingHints renderHints)
/*     */   {
/*  67 */     RenderedImage source = paramBlock.getRenderedSource(0);
/*  68 */     float xTrans = paramBlock.getFloatParameter(0);
/*  69 */     float yTrans = paramBlock.getFloatParameter(1);
/*  70 */     Interpolation interp = (Interpolation)paramBlock.getObjectParameter(2);
/*     */
/*  74 */     ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
/*     */
/*  77 */     if ((Math.abs(xTrans - (int)xTrans) < 0.01F) && (Math.abs(yTrans - (int)yTrans) < 0.01F) && (layout == null))
/*     */     {
View Full Code Here

/*  83 */       ROI srcROI = (ROI)property;
/*  84 */       if (srcROI.getBounds().isEmpty()) {
/*  85 */         return Image.UndefinedProperty;
/*     */       }
/*     */
/*  89 */       Interpolation interp = (Interpolation)pb.getObjectParameter(1);
/*     */
/*  92 */       Rectangle srcBounds = null;
/*  93 */       PlanarImage dst = op.getRendering();
/*  94 */       if (((dst instanceof GeometricOpImage)) && (((GeometricOpImage)dst).getBorderExtender() == null))
/*     */       {
/*  96 */         srcBounds = new Rectangle(src.getMinX() + interp.getLeftPadding(), src.getMinY() + interp.getTopPadding(), src.getWidth() - interp.getWidth() + 1, src.getHeight() - interp.getHeight() + 1);
/*     */       }
/*     */       else
/*     */       {
/* 102 */         srcBounds = new Rectangle(src.getMinX(), src.getMinY(), src.getWidth(), src.getHeight());
/*     */       }
/*     */
/* 109 */       if (!srcBounds.contains(srcROI.getBounds())) {
/* 110 */         srcROI = srcROI.intersect(new ROIShape(srcBounds));
/*     */       }
/*     */
/* 114 */       Interpolation interpNN = (interp instanceof InterpolationNearest) ? interp : Interpolation.getInstance(0);
/*     */
/* 119 */       Warp warp = (Warp)pb.getObjectParameter(0);
/*     */
/* 122 */       ROI dstROI = new ROI(JAI.create("warp", srcROI.getAsImage(), warp, interpNN));
/*     */
View Full Code Here

/*  810 */     if (!isFull) {
/*  811 */       postTransform.scale(dstROI.getWidth() / rendering.getWidth(), dstROI.getHeight() / rendering.getHeight());
/*      */     }
/*      */
/*  816 */     if (!postTransform.isIdentity()) {
/*  817 */       Interpolation interp = Interpolation.getInstance(0);
/*      */
/*  819 */       RenderingHints hints = renderContext.getRenderingHints();
/*  820 */       if ((hints != null) && (hints.containsKey(JAI.KEY_INTERPOLATION))) {
/*  821 */         interp = (Interpolation)hints.get(JAI.KEY_INTERPOLATION);
/*      */       }
View Full Code Here

/* 141 */       Rectangle srcBounds = null;
/* 142 */       PlanarImage dst = op.getRendering();
/* 143 */       if (((dst instanceof GeometricOpImage)) && (((GeometricOpImage)dst).getBorderExtender() == null))
/*     */       {
/* 145 */         GeometricOpImage geomIm = (GeometricOpImage)dst;
/* 146 */         Interpolation interp = geomIm.getInterpolation();
/* 147 */         srcBounds = new Rectangle(src.getMinX() + interp.getLeftPadding(), src.getMinY() + interp.getTopPadding(), src.getWidth() - interp.getWidth() + 1, src.getHeight() - interp.getHeight() + 1);
/*     */       }
/*     */       else
/*     */       {
/* 153 */         srcBounds = src.getBounds();
/*     */       }
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());
/*     */       }
/*     */
/* 103 */       Interpolation interpNN = (interp instanceof InterpolationNearest) ? interp : Interpolation.getInstance(0);
/*     */
/* 108 */       float sv = pb.getFloatParameter(0);
/* 109 */       EnumeratedParameter shearDir = (EnumeratedParameter)pb.getObjectParameter(1);
/*     */
/* 111 */       float tx = pb.getFloatParameter(2);
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.