Package javax.media.jai

Examples of javax.media.jai.EnumeratedParameter


  if (!modeName.equalsIgnoreCase("rendered"))
      return true;

        // Check source band count: must be even for a complex source.
        EnumeratedParameter dataNature =
            (EnumeratedParameter)args.getObjectParameter(1);

        if (!dataNature.equals(REAL_TO_COMPLEX)) {
            RenderedImage src = args.getRenderedSource(0);

            if (src.getSampleModel().getNumBands() % 2 != 0) {
                msg.append(getName() + " " +
                           JaiI18N.getString("DFTDescriptor5"));
View Full Code Here


        BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);

        RenderedImage source = paramBlock.getRenderedSource(0);

        float shear_amt = paramBlock.getFloatParameter(0);
        EnumeratedParameter shear_dir =
            (EnumeratedParameter)paramBlock.getObjectParameter(1);

        float xTrans = paramBlock.getFloatParameter(2);
        float yTrans = paramBlock.getFloatParameter(3);

        Object arg1 = paramBlock.getObjectParameter(4);
        Interpolation interp = (Interpolation)arg1;

        double[] backgroundValues = (double[])paramBlock.getObjectParameter(5);

        // Create the affine transform
        AffineTransform tr = new AffineTransform();

        if (shear_dir.equals(ShearDescriptor.SHEAR_HORIZONTAL)) {
            // SHEAR_HORIZONTAL
            tr.setTransform(1.0, 0.0, shear_amt, 1.0, xTrans, 0.0);
        } else {
            // SHEAR_VERTICAL
            tr.setTransform(1.0, shear_amt, 0.0, 1.0, 0.0, yTrans);
View Full Code Here

  if (!modeName.equalsIgnoreCase("rendered"))
      return true;

        // Check source band count: must be even for a complex source.
        EnumeratedParameter dataNature =
            (EnumeratedParameter)args.getObjectParameter(1);

        if (!dataNature.equals(IDFTDescriptor.REAL_TO_COMPLEX)) {
            RenderedImage src = args.getRenderedSource(0);

            if (src.getSampleModel().getNumBands() % 2 != 0) {
                msg.append(getName() + " " +
                           JaiI18N.getString("IDFTDescriptor5"));
View Full Code Here

                interp :
                Interpolation.getInstance(Interpolation.INTERP_NEAREST);

            // Retrieve the operation parameters.
            float sv = pb.getFloatParameter(0);
            EnumeratedParameter shearDir =
                (EnumeratedParameter)pb.getObjectParameter(1);
            float tx = pb.getFloatParameter(2);
            float ty = pb.getFloatParameter(3);

            // Create an equivalent transform.
View Full Code Here

/*    */
/* 69 */     RenderedImage alpha1 = (RenderedImage)args.getObjectParameter(0);
/* 70 */     Object alpha2 = args.getObjectParameter(1);
/* 71 */     boolean premultiplied = ((Boolean)args.getObjectParameter(2)).booleanValue();
/*    */
/* 73 */     EnumeratedParameter destAlpha = (EnumeratedParameter)args.getObjectParameter(3);
/*    */
/* 76 */     SampleModel sm = alpha1.getSampleModel();
/*    */
/* 78 */     if ((!(sm instanceof ComponentSampleModel)) || (sm.getNumBands() != 1) || (!(alpha1.getColorModel() instanceof ComponentColorModel)) || (alpha2 != null) || (premultiplied) || (!destAlpha.equals(CompositeDescriptor.NO_DESTINATION_ALPHA)))
/*    */     {
/* 84 */       return null;
/*    */     }
/*    */
/* 88 */     return new MlibCompositeOpImage(args.getRenderedSource(0), args.getRenderedSource(1), hints, layout, alpha1);
View Full Code Here

/*     */     }
/*     */
/*  80 */     BorderExtender extender = RIFUtil.getBorderExtenderHint(hints);
/*     */
/*  82 */     float shear_amt = args.getFloatParameter(0);
/*  83 */     EnumeratedParameter shear_dir = (EnumeratedParameter)args.getObjectParameter(1);
/*     */
/*  85 */     float xTrans = args.getFloatParameter(2);
/*  86 */     float yTrans = args.getFloatParameter(3);
/*  87 */     double[] backgroundValues = (double[])args.getObjectParameter(5);
/*     */
/*  90 */     AffineTransform tr = new AffineTransform();
/*     */
/*  92 */     if (shear_dir.equals(ShearDescriptor.SHEAR_HORIZONTAL))
/*     */     {
/*  94 */       tr.setTransform(1.0D, 0.0D, shear_amt, 1.0D, xTrans, 0.0D);
/*     */     }
/*     */     else {
/*  97 */       tr.setTransform(1.0D, shear_amt, 0.0D, 1.0D, 0.0D, yTrans);
View Full Code Here

/*    */   public RenderedImage create(ParameterBlock paramBlock, RenderingHints renderHints)
/*    */   {
/* 57 */     ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
/*    */
/* 60 */     RenderedImage source = paramBlock.getRenderedSource(0);
/* 61 */     EnumeratedParameter scalingType = (EnumeratedParameter)paramBlock.getObjectParameter(0);
/*    */
/* 63 */     EnumeratedParameter dataNature = (EnumeratedParameter)paramBlock.getObjectParameter(1);
/*    */
/* 66 */     FFT fft = new FFT(false, new Integer(scalingType.getValue()), 2);
/*    */
/* 68 */     return new DFTOpImage(source, renderHints, layout, dataNature, fft);
/*    */   }
View Full Code Here

/*  65 */     if (!MediaLibAccessor.isMediaLibCompatible(new ParameterBlock())) {
/*  66 */       return null;
/*     */     }
/*     */
/*  69 */     RenderedImage source = args.getRenderedSource(0);
/*  70 */     EnumeratedParameter scalingType = (EnumeratedParameter)args.getObjectParameter(0);
/*     */
/*  72 */     EnumeratedParameter dataNature = (EnumeratedParameter)args.getObjectParameter(1);
/*     */
/*  75 */     boolean isComplexSource = !dataNature.equals(DFTDescriptor.REAL_TO_COMPLEX);
/*     */
/*  77 */     int numSourceBands = source.getSampleModel().getNumBands();
/*     */
/*  83 */     if (((isComplexSource) && (numSourceBands == 2)) || ((!isComplexSource) && (numSourceBands == 1) && (MlibDFTOpImage.isAcceptableSampleModel(source.getSampleModel()))))
/*     */     {
View Full Code Here

/*  66 */     if (!MediaLibAccessor.isMediaLibCompatible(new ParameterBlock())) {
/*  67 */       return null;
/*     */     }
/*     */
/*  70 */     RenderedImage source = args.getRenderedSource(0);
/*  71 */     EnumeratedParameter scalingType = (EnumeratedParameter)args.getObjectParameter(0);
/*     */
/*  73 */     EnumeratedParameter dataNature = (EnumeratedParameter)args.getObjectParameter(1);
/*     */
/*  76 */     boolean isComplexSource = !dataNature.equals(DFTDescriptor.REAL_TO_COMPLEX);
/*     */
/*  78 */     int numSourceBands = source.getSampleModel().getNumBands();
/*     */
/*  84 */     if (((isComplexSource) && (numSourceBands == 2)) || ((!isComplexSource) && (numSourceBands == 1) && (MlibDFTOpImage.isAcceptableSampleModel(source.getSampleModel()))))
/*     */     {
View Full Code Here

/*     */
/* 247 */     if (!modeName.equalsIgnoreCase("rendered")) {
/* 248 */       return true;
/*     */     }
/*     */
/* 251 */     EnumeratedParameter dataNature = (EnumeratedParameter)args.getObjectParameter(1);
/*     */
/* 254 */     if (!dataNature.equals(REAL_TO_COMPLEX)) {
/* 255 */       RenderedImage src = args.getRenderedSource(0);
/*     */
/* 257 */       if (src.getSampleModel().getNumBands() % 2 != 0) {
/* 258 */         msg.append(getName() + " " + JaiI18N.getString("IDFTDescriptor5"));
/*     */
View Full Code Here

TOP

Related Classes of javax.media.jai.EnumeratedParameter

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.