Examples of addSource()


Examples of java.awt.image.renderable.ParameterBlock.addSource()

                            PlanarImage monochrome = JAI.create("BandCombine", pb, null);

                            RenderingHints layoutHints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, Functions.getImageLayout(labImage));
                            // layoutHints.add(JAIContext.noCacheHint);
                            pb = new ParameterBlock();
                            pb.addSource(monochrome);
                            pb.addSource(abImage);
                            PlanarImage maskImage = JAI.create("BandMerge", pb, layoutHints);

                            colorSelectionMask = new RGBColorSelectionMaskOpImage(maskImage, getColorSelection(), null);
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

                            RenderingHints layoutHints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, Functions.getImageLayout(labImage));
                            // layoutHints.add(JAIContext.noCacheHint);
                            pb = new ParameterBlock();
                            pb.addSource(monochrome);
                            pb.addSource(abImage);
                            PlanarImage maskImage = JAI.create("BandMerge", pb, layoutHints);

                            colorSelectionMask = new RGBColorSelectionMaskOpImage(maskImage, getColorSelection(), null);

                            ParameterBlock maskPB;
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

                            RenderingHints extenderHints = new RenderingHints(JAI.KEY_BORDER_EXTENDER,
                                                                              BorderExtender.createInstance(BorderExtender.BORDER_COPY));
                            KernelJAI kernel = Functions.getGaussKernel(0.5 * scale);
                            maskPB = new ParameterBlock();
                            maskPB.addSource(colorSelectionMask);
                            maskPB.add(kernel);
                            colorSelectionMask = JAI.create("Convolve", maskPB, extenderHints);

                            lastColorSelection = colorSelection;
                        } else if (colorSelection == null || colorSelection.isAllSelected())
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

                            tiffImage.getSampleModel(),
                            tiffImage.getColorModel()
                        )
                    );
                    final ParameterBlock pb = new ParameterBlock();
                    pb.addSource(tiffImage);
                    pb.add(tiffImage.getSampleModel().getDataType());
                    image = JAI.create("Format", pb, formatHints);
                    image.setProperty(JAIContext.PERSISTENT_CACHE_TAG, Boolean.TRUE);
                } else
                    image = tiffImage;
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

        visibleRect = bounds.intersection(visibleRect);

        if (bounds.contains(visibleRect)) {
            ParameterBlock pb = new ParameterBlock();
            pb.addSource(image);
            pb.add((float) visibleRect.x);
            pb.add((float) visibleRect.y);
            pb.add((float) visibleRect.width);
            pb.add((float) visibleRect.height);
            image = JAI.create("Crop", pb, JAIContext.noCacheHint);
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

            image = ConvolveDescriptor.create(
                image, Functions.getGaussKernel(.25 / scale), null
            );
            ParameterBlock pb = new ParameterBlock();
            pb.addSource(image);
            pb.add(scale);
            pb.add(scale);
            image = JAI.create("Scale", pb, JAIContext.noCacheHint);
        }
        image =
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

        final ImageOrientation orientation = metaData.getOrientation();
        final TransposeType transpose = orientation.getCorrection();
        if ( transpose == null )
            return thumb;
        final ParameterBlock pb = new ParameterBlock();
        pb.addSource( thumb );
        pb.add( transpose );
        return JAI.create( "Transpose", pb, null );
    }

    /**
 
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

        float kdata[] = kernel.getHorizontalKernelData();
        float qsFilterArray[] = new float[kdata.length - ko];
        System.arraycopy(kdata, ko, qsFilterArray, 0, qsFilterArray.length);

        ParameterBlock params = new ParameterBlock();
        params.addSource(src);
        params.add(ratio);
        params.add(ratio);
        params.add(qsFilterArray);
        params.add(Interpolation.getInstance(Interpolation.INTERP_NEAREST));
        return JAI.create("FilteredSubsample", params,
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

            if (!transform.isIdentity()) {
                RenderingHints extenderHints = new RenderingHints(JAI.KEY_BORDER_EXTENDER,
                                                                  BorderExtender.createInstance(BorderExtender.BORDER_COPY));
                ParameterBlock params = new ParameterBlock();
                params.addSource(image);
                params.add(transform);
                params.add(Interpolation.getInstance(cheapScale ? Interpolation.INTERP_BILINEAR : Interpolation.INTERP_BICUBIC));
                // params.add(Interpolation.getInstance(Interpolation.INTERP_BILINEAR));
                xformedSourceImage = JAI.create("Affine", params, extenderHints);
            } else
View Full Code Here

Examples of java.awt.image.renderable.ParameterBlock.addSource()

        ImageOrientation orientation = metadata.getOrientation();
        if (orientation != null) {
            transposeAngle = orientation.getCorrection();
            if (transposeAngle != null) {
                ParameterBlock pb = new ParameterBlock();
                pb.addSource(sourceImage);
                pb.add(transposeAngle);
                RenderedOp transposed = JAI.create("Transpose", pb, null);
                transposed.setProperty(JAIContext.PERSISTENT_CACHE_TAG, Boolean.TRUE);
                // sourceImage = transposed;
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.