Package javax.media.jai

Examples of javax.media.jai.Interpolation


        RenderedImage source = paramBlock.getRenderedSource(0);
        float xScale = paramBlock.getFloatParameter(0);
        float yScale = paramBlock.getFloatParameter(1);
        float xTrans = paramBlock.getFloatParameter(2);
        float yTrans = paramBlock.getFloatParameter(3);
        Interpolation interp = (Interpolation)paramBlock.getObjectParameter(4);

  // Check and see if we are scaling by 1.0 in both x and y and no
        // translations. If so call the copy operation.
 
  if (xScale == 1.0F && yScale == 1.0F &&
View Full Code Here


        float scale_x = paramBlock.getFloatParameter(0);
        float scale_y = paramBlock.getFloatParameter(1);
        float trans_x = paramBlock.getFloatParameter(2);
        float trans_y = paramBlock.getFloatParameter(3);
        Interpolation interp = (Interpolation)paramBlock.getObjectParameter(4);

  // Get the source dimensions
  float x0 = (float)source.getMinX();
  float y0 = (float)source.getMinY() ;
  float w = (float)source.getWidth();
View Full Code Here

    public RenderedImage create(ParameterBlock args,
                                RenderingHints hints) {
        RenderedImage source = args.getRenderedSource(0);
        float xTrans = args.getFloatParameter(0);
        float yTrans = args.getFloatParameter(1);
        Interpolation interp = (Interpolation) args.getObjectParameter(2);

  /* Get ImageLayout and TileCache from RenderingHints. */
  ImageLayout layout = RIFUtil.getImageLayoutHint(hints);

        if ((Math.abs(xTrans - (int)xTrans) < TOLERANCE) &&
View Full Code Here

        ImageLayout layout = RIFUtil.getImageLayoutHint(hints);

        // Get operation parameters.
        AffineTransform transform =
            (AffineTransform)args.getObjectParameter(0);
        Interpolation interp = (Interpolation)args.getObjectParameter(1);
        double[] backgroundValues = (double[])args.getObjectParameter(2);

        RenderedImage source = args.getRenderedSource(0);
 
        if (!MediaLibAccessor.isMediaLibCompatible(args, layout) ||
View Full Code Here

            (ImageLayout)renderHints.get(JAI.KEY_IMAGE_LAYOUT);

        int scaleX = paramBlock.getIntParameter(0);
        int scaleY = paramBlock.getIntParameter(1);
        float [] qsFilter = (float [])paramBlock.getObjectParameter(2);
        Interpolation interp = (Interpolation)paramBlock.getObjectParameter(3);

        // check if binary and interpolation type allowed
  SampleModel sm = source.getSampleModel();
        int dataType = sm.getDataType();
View Full Code Here

                return java.awt.Image.UndefinedProperty;
            }
            ROI srcROI = (ROI)property;

            // Retrieve the Interpolation object.
            Interpolation interp = (Interpolation)pb.getObjectParameter(3);

            // Determine the effective source bounds.
            Rectangle srcBounds = null;
            PlanarImage dst = op.getRendering();
            if (dst instanceof GeometricOpImage &&
                ((GeometricOpImage)dst).getBorderExtender() == null) {
                srcBounds =
                    new Rectangle(src.getMinX() + interp.getLeftPadding(),
                                  src.getMinY() + interp.getTopPadding(),
                                  src.getWidth() - interp.getWidth() + 1,
                                  src.getHeight() - interp.getHeight() + 1);
            } else {
                srcBounds = new Rectangle(src.getMinX(),
            src.getMinY(),
            src.getWidth(),
            src.getHeight());
View Full Code Here

                                dstROI.getHeight()/rendering.getHeight());
        }

        // Translate (and scale) the result if necessary.
        if(!postTransform.isIdentity()) {
            Interpolation interp =
                Interpolation.getInstance(Interpolation.INTERP_NEAREST);
            RenderingHints hints = renderContext.getRenderingHints();
            if(hints != null && hints.containsKey(JAI.KEY_INTERPOLATION)) {
                interp = (Interpolation)hints.get(JAI.KEY_INTERPOLATION);
            }
View Full Code Here

                return java.awt.Image.UndefinedProperty;
            }
            ROI srcROI = (ROI)property;

            // Retrieve the Interpolation object.
            Interpolation interp = (Interpolation)pb.getObjectParameter(4);

            // Determine the effective source bounds.
            Rectangle srcBounds = null;
            PlanarImage dst = op.getRendering();
            if (dst instanceof GeometricOpImage &&
                ((GeometricOpImage)dst).getBorderExtender() == null) {
                srcBounds =
                    new Rectangle(src.getMinX() + interp.getLeftPadding(),
                                  src.getMinY() + interp.getTopPadding(),
                                  src.getWidth() - interp.getWidth() + 1,
                                  src.getHeight() - interp.getHeight() + 1);
            } else {
                srcBounds = new Rectangle(src.getMinX(),
            src.getMinY(),
            src.getWidth(),
            src.getHeight());
View Full Code Here

            // Retrieve the transpose type and create a nearest neighbor
            // Interpolation object.
            TransposeType transposeType =
                (TransposeType)pb.getObjectParameter(0);
            Interpolation interp =
                Interpolation.getInstance(Interpolation.INTERP_NEAREST);

            // Return the transposed ROI.
            return new ROI(JAI.create("transpose", srcROI.getAsImage(),
                                      transposeType));
View Full Code Here

      }

      args.set(filter, 2);
  }

        Interpolation interp = (Interpolation)args.getObjectParameter(3);

        // Determine the interpolation type, if not supported throw exception
        if (!((interp instanceof InterpolationNearest||
            (interp instanceof InterpolationBilinear) ||
            (interp instanceof InterpolationBicubic||
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.