Examples of SerializableState


Examples of com.lightcrafts.mediax.jai.remote.SerializableState

            }
            else {
                if (!(object instanceof SerializableState))
                    raster = null;
                // Reconstruct the Raster from the serialized form.
                SerializableState ss = (SerializableState)object;
                Class c = ss.getObjectClass();
                if (Raster.class.isAssignableFrom(c)) {
                    raster = (Raster)ss.getObject();
                }
                else raster = null;
            }

      // Close the various streams and the socket.
View Full Code Here

Examples of com.lightcrafts.mediax.jai.remote.SerializableState

            source = new RemoteImage(serverName+"::"+id.longValue(),
                                     (RenderedImage)null);
        }

        // Read the source vector and properties table.
        SerializableState smState = (SerializableState)in.readObject();
        sampleModel = (SampleModel)smState.getObject();
        SerializableState cmState = (SerializableState)in.readObject();
        colorModel = (ColorModel)cmState.getObject();
        properties = (Hashtable)in.readObject();

        // Read the image Raster.
        if (useDeepCopy) {
            if (useTileCodec)
                imageRaster =
        decodeRasterFromByteArray((byte[])in.readObject());
            else {
                SerializableState rasState =
        (SerializableState)in.readObject();
                imageRaster = (Raster)rasState.getObject();
            }
        }
    }
View Full Code Here

Examples of com.lightcrafts.mediax.jai.remote.SerializableState

                if (!pbCloned) {
                    pbClone = (ParameterBlock)pb.clone();
                    pbCloned = true;
                }
                if (source instanceof RenderedImage) {
                    SerializableState serializableImage =
                        SerializerFactory.getState(source, null);
                    pbClone.setSource(serializableImage, index);
                } else {
                    throw new RuntimeException(source.getClass().getName() +
                        JaiI18N.getString("OperationNodeSupport0"));
View Full Code Here

Examples of com.lightcrafts.mediax.jai.remote.SerializableState

        // Read non-static and non-transient fields.
        in.defaultReadObject();
        // Read ParameterBlock.
        pb = (ParameterBlock)in.readObject();
        // Read RenderingHints.
        SerializableState ss = (SerializableState)in.readObject();
        hints = (RenderingHints)ss.getObject();

        // Wrap any RenderedImageState sources in PlanarImage objects.
        for (int index = 0; index < pb.getNumSources(); index++) {
            Object source = pb.getSource(index);
            if (source instanceof SerializableState) {
                ss = (SerializableState)source;
                PlanarImage pi =
                    PlanarImage.wrapRenderedImage((RenderedImage)ss.getObject());
                pb.setSource(pi, index);
            }
        }

        // Extract Raster and PlanarImage parameters from RasterState and
View Full Code Here

Examples of com.lightcrafts.mediax.jai.remote.SerializableState

        if(isValid(SAMPLE_MODEL_MASK)) {
            Object object = in.readObject();
            if (!(object instanceof SerializableState))
                sampleModel = null;

            SerializableState ss = (SerializableState)object;
            Class c = ss.getObjectClass();
            if (SampleModel.class.isAssignableFrom(c))
                sampleModel = (SampleModel)ss.getObject();
            else
                sampleModel = null;
        }

        // Read the serializable form of the ColorModel.
        if(isValid(COLOR_MODEL_MASK)) {
            Object object = in.readObject();
            if (!(object instanceof SerializableState))
                colorModel = null;

            SerializableState ss = (SerializableState)object;
            Class c = ss.getObjectClass();
            if (ColorModel.class.isAssignableFrom(c))
                colorModel = (ColorModel)ss.getObject();
            else
                colorModel = null;
        }
    }
View Full Code Here

Examples of com.lightcrafts.mediax.jai.remote.SerializableState

        Object[] source = (Object[])in.readObject();
        numSources = source.length;
        renderedSource = new RenderedImage[numSources];
        for (int i = 0; i < numSources; i++) {
            if (source[i] instanceof SerializableState) {
                SerializableState ss = (SerializableState)source[i];
                renderedSource[i] = (RenderedImage)ss.getObject();
            } else renderedSource[i] = (RenderedImage)source[i];
        }
    }
View Full Code Here

Examples of fr.irit.halterego.rrl_ggp.serialization.SerializableState

                        min_q.put(role, action, max_q);
                    }
                }
            }
           
            SerializableState sstate = getState(state);
           
            for (String role : roles)
            {
                for (RAction raction : min_q.getActions(role))
                {
View Full Code Here

Examples of fr.irit.halterego.rrl_ggp.serialization.SerializableState

        {
            max_q = state.getReward(role);
        }
        else
        {
            SerializableState sstate = getState(state);
            SerializableAction saction = getAction(actions.iterator().next());
            max_q = table.getQValue(sstate, role, saction);
            for (RAction action : state.legalActions(role))
            {
                saction = getAction(action);
View Full Code Here

Examples of fr.irit.halterego.rrl_ggp.serialization.SerializableState

                    break;
                }
               
                Element root = builder.build(file).getRootElement();
                List<Element> states = root.getChildren("state");
                SerializableState state = getState(states.get(0));
                SerializableAction action = actions.get(step);
                if(action != null)
                {
                    transitions.add(new Transition(state,action));
                }
View Full Code Here

Examples of fr.irit.halterego.rrl_ggp.serialization.SerializableState

        Set<GroundFact> state = new HashSet<GroundFact>();
        for(Element e : element.getChildren("fact"))
        {
            state.add(createGroundFact(e));
        }
        return new SerializableState(state);
    }
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.