Examples of ParameterListDescriptor


Examples of javax.media.jai.ParameterListDescriptor

/* 1228 */       TileCodecParameterList temp = this.decodingParam;
/*      */
/* 1230 */       if (temp != null) {
/* 1231 */         TileCodecDescriptor tcd = getTileCodecDescriptor("tileDecoder", this.formatName);
/*      */
/* 1233 */         ParameterListDescriptor pld = tcd.getParameterListDescriptor("tileDecoder");
/*      */
/* 1235 */         this.decodingParam = new TileCodecParameterList(this.formatName, new String[] { "tileDecoder" }, pld);
/*      */
/* 1239 */         String[] names = pld.getParamNames();
/*      */
/* 1241 */         if (names != null)
/* 1242 */           for (int i = 0; i < names.length; i++)
/* 1243 */             this.decodingParam.setParameter(names[i], temp.getObjectParameter(names[i]));
/*      */       }
View Full Code Here

Examples of javax.media.jai.ParameterListDescriptor

/*     */   public NegotiableCapability getDecodeCapability()
/*     */   {
/* 100 */     Vector generators = new Vector();
/* 101 */     generators.add(JPEGTileDecoderFactory.class);
/*     */
/* 103 */     ParameterListDescriptor jpegPld = JAI.getDefaultInstance().getOperationRegistry().getDescriptor("tileDecoder", "jpeg").getParameterListDescriptor("tileDecoder");
/*     */
/* 105 */     Class[] paramClasses = { NegotiableNumericRange.class, NegotiableCollection.class, NegotiableNumericRange.class, NegotiableCollection.class, NegotiableCollection.class, NegotiableCollection.class };
/*     */
/* 123 */     String[] paramNames = { "quality", "qualitySet", "restartInterval", "writeImageInfo", "writeTableInfo", "writeJFIFHeader" };
/*     */
/* 134 */     Vector v = new Vector();
/* 135 */     v.add(new Boolean(true));
/* 136 */     v.add(new Boolean(false));
/* 137 */     NegotiableCollection negCollection = new NegotiableCollection(v);
/*     */
/* 139 */     NegotiableNumericRange nnr1 = new NegotiableNumericRange(jpegPld.getParamValueRange(paramNames[0]));
/*     */
/* 143 */     NegotiableNumericRange nnr2 = new NegotiableNumericRange(jpegPld.getParamValueRange(paramNames[2]));
/*     */
/* 148 */     Object[] defaults = { nnr1, negCollection, nnr2, negCollection, negCollection, negCollection };
/*     */
/* 157 */     NegotiableCapability decodeCap = new NegotiableCapability("tileCodec", "jpeg", generators, new ParameterListDescriptorImpl(null, paramNames, paramClasses, defaults, null), false);
/*     */
View Full Code Here

Examples of javax.media.jai.ParameterListDescriptor

/* 162 */         JPEGQTable table = jdp.getQTable(i);
/* 163 */         this.paramList.setParameter("quantizationTable" + i, table == null ? null : table.getTable());
/*     */       }
/*     */     }
/*     */     else {
/* 167 */       ParameterListDescriptor pld = this.paramList.getParameterListDescriptor();
/*     */
/* 169 */       for (int i = 0; i < 4; i++) {
/* 170 */         this.paramList.setParameter("quantizationTable" + i, pld.getParamDefaultValue("quantizationTable" + i));
/*     */       }
/*     */
/*     */     }
/*     */
/* 176 */     int[] quanTableMapping = new int[bandNum];
View Full Code Here

Examples of javax.media.jai.ParameterListDescriptor

/*     */       }
/*     */
/*     */     }
/*     */     else
/*     */     {
/* 165 */       ParameterListDescriptor pld = tcd.getParameterListDescriptor("tileDecoder");
/*     */
/* 169 */       if (!tcd.includesSampleModelInfo())
/*     */       {
/* 171 */         throw new IllegalArgumentException(JaiI18N.getString("TileDecoderImpl5"));
/*     */       }
/*     */
/* 178 */       if ((pld != null) && (pld.getNumParameters() != 0)) {
/* 179 */         throw new IllegalArgumentException(JaiI18N.getString("TileDecoderImpl6"));
/*     */       }
/*     */
/*     */     }
/*     */
View Full Code Here

Examples of javax.media.jai.ParameterListDescriptor

/*     */       }
/*     */
/*     */     }
/*     */     else
/*     */     {
/* 135 */       ParameterListDescriptor pld = tcd.getParameterListDescriptor("tileEncoder");
/*     */
/* 141 */       if ((pld != null) && (pld.getNumParameters() != 0)) {
/* 142 */         throw new IllegalArgumentException(JaiI18N.getString("TileDecoderImpl6"));
/*     */       }
/*     */
/*     */     }
/*     */
View Full Code Here

Examples of javax.media.jai.ParameterListDescriptor

        final OperationRegistry registry = JAI.getDefaultInstance().getOperationRegistry();
        assertNotNull(registry.getDescriptor("rendered", SampleTranscoder.OPERATION_NAME));

        final BufferedImage       dummy = new BufferedImage(10, 10, BufferedImage.TYPE_BYTE_GRAY);
        final ParameterBlockJAI   param = new ParameterBlockJAI(SampleTranscoder.OPERATION_NAME);
        final ParameterListDescriptor d = param.getParameterListDescriptor();
        assertTrue(d.getParamClasses()[0].equals(GridSampleDimension[].class));

        try {
            JAI.create(SampleTranscoder.OPERATION_NAME, param);
            fail();
        } catch (IllegalArgumentException expected) {
View Full Code Here

Examples of javax.media.jai.ParameterListDescriptor

                && !hasTranslateY) {
            return this;
        }

        // apply defaults to allow for comparisong
        ParameterListDescriptor pld = new AffineDescriptor()
                .getParameterListDescriptor(RenderedRegistryMode.MODE_NAME);
        if (interpolation == null) {
            interpolation = (Interpolation) pld.getParamDefaultValue("interpolation");
        }
        if (bgValues == null) {
            bgValues = (double[]) pld.getParamDefaultValue("backgroundValues");
        }

        // affine over affine/scale?
        RenderedImage source = image;
        if (image instanceof RenderedOp) {
View Full Code Here

Examples of javax.media.jai.ParameterListDescriptor

     *         to allow {@link #clone} to modify the values right after the clone. In other cases,
     *         this array should be discarted.
     */
    private GeneralParameterValue[] createElements() {
        final ImagingParameterDescriptors descriptor = (ImagingParameterDescriptors) this.descriptor;
        final ParameterListDescriptor listDescriptor = parameters.getParameterListDescriptor();
        final String[]    names       = listDescriptor.getParamNames();
        final Class[]     types       = listDescriptor.getParamClasses();
        final String[]    enumerated  = listDescriptor.getEnumeratedParameterNames();
        final List<GeneralParameterDescriptor> descriptors = descriptor.descriptors();
        final GeneralParameterValue[] values = new GeneralParameterValue[descriptors.size()];
        for (int i=0; i<values.length; i++) {
            final ParameterDescriptor d = (ParameterDescriptor) descriptors.get(i);
            final ParameterValue value;
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.