Package javax.media.jai

Examples of javax.media.jai.RenderableOp


        // scale from dimension needing smallest scale.
        double scale = Math.min( scaleW, scaleH );
        double needW = getWidth() * scale;
        double needH = getHeight() * scale;
       
        RenderableOp original = getCorrectedImage( (int)needW, (int)needH, isLowQualityAllowed );
        if ( previousCorrectedImage != original ) {
            buildPipeline( original );
        }

        int renderingWidth = maxWidth;
View Full Code Here


        double rotH = rotSin * getWidth() + rotCos * getHeight();
        // Size if full image was cropped
        double cropW = rotW * (cropMaxX-cropMinX);
        double cropH = rotH * (cropMaxY-cropMinY);   

        RenderableOp original = getCorrectedImage( (int)(getWidth()*scale),
                (int)(getHeight()*scale), isLowQualityAllowed );
        if ( previousCorrectedImage != original ) {
            buildPipeline( original );
        }
        RenderingHints hints = new RenderingHints( null );
View Full Code Here

        // Create a ParameterBlock for the conversion.
        ParameterBlock pb = new ParameterBlock();
        pb.addSource( src );
        pb.add(ihsColorModel);
        // Do the conversion.
        RenderableOp ihsImage  = JAI.createRenderable("colorconvert", pb );
        ihsImage.setProperty( "org.photovault.opname", "color_corrected_ihs_image" );

//        saturatedIhsImage =
//                MultiplyConstDescriptor.createRenderable( ihsImage, new double[] {1.0, 1.0, saturation}, null );
        LookupTableJAI jailut = createSaturationMappingLUT();
        saturatedIhsImage = LookupDescriptor.createRenderable( ihsImage, jailut, null );
       
        pb = new ParameterBlock();
        pb.addSource(saturatedIhsImage);
        ColorSpace sRGB = ColorSpace.getInstance( ColorSpace.CS_sRGB );
        ColorModel srgbColorModel =
                new ComponentColorModel(sRGB,
                componentSizes,
                false,false,
                Transparency.OPAQUE,
                srcCm.getTransferType() );
        pb.add(srgbColorModel); // RGB color model!       
        RenderableOp saturatedImage = JAI.createRenderable("colorconvert", pb );       
        saturatedImage.setProperty( "org.photovault.opname", "saturated_image" );
       
        return saturatedImage;
    }
View Full Code Here

             String serverName,
             String opName,
             int index)
  throws RemoteException {

  RenderableOp node = (RenderableOp)nodes.get(id);
  node.setSource(new RMIServerProxy((serverName+"::"+sourceId),
            opName,
            null),
           index);

    }
View Full Code Here

                  String serverName,
                  String opName,
                  int index)
  throws RemoteException {

  RenderableOp node = (RenderableOp)nodes.get(id);
  node.setSource(new RenderableRMIServerProxy(serverName, opName, null,
                sourceId), index);
    }
View Full Code Here

     *
     */
    public synchronized void setRenderableSource(Long id, RenderableOp source,
             int index)
  throws RemoteException {
  RenderableOp op = (RenderableOp)nodes.get(id);
  op.setSource(source, index);
    }
View Full Code Here

     */
    public synchronized void setRenderableSource(Long id,
             SerializableRenderableImage s,
             int index)
  throws RemoteException {
  RenderableOp op = (RenderableOp)nodes.get(id);
  op.setSource(s, index);
    }
View Full Code Here

             RenderedImage source,
             int index)
  throws RemoteException {

  PlanarImage pi = PlanarImage.wrapRenderedImage(source);
  RenderableOp op = (RenderableOp)nodes.get(id);
  op.setSource(pi, index);
    }
View Full Code Here

                SerializableState rcs)
  throws RemoteException {

  // Retrieve the RenderableOp for the rendering of which
  // the mapRenderContext call is being made.
  RenderableOp rop = (RenderableOp)nodes.get(nodeId);

  //Find the CRIF for the respective operation
  ContextualRenderedImageFactory crif =
      CRIFRegistry.get(rop.getRegistry(), operationName);

  if (crif == null) {
      throw new RuntimeException(
            JaiI18N.getString("JAIRMIImageServer3"));
  }

  RenderContext rc =
      crif.mapRenderContext(id,
          (RenderContext)rcs.getObject(),
          (ParameterBlock)rop.getParameterBlock(),
          rop);
  return SerializerFactory.getState(rc, null);
    }
View Full Code Here

    public SerializableState getBounds2D(Long nodeId, String operationName)
  throws RemoteException {

  // Retrieve the RenderableOp for whose RIF
  // the mapRenderContext call is being made.
  RenderableOp rop = (RenderableOp)nodes.get(nodeId);

  //Find the CRIF for the respective operation
  ContextualRenderedImageFactory crif =
      CRIFRegistry.get(rop.getRegistry(), operationName);

  if (crif == null) {
      throw new RuntimeException(
            JaiI18N.getString("JAIRMIImageServer3"));
  }

  Rectangle2D r2D =
      crif.getBounds2D((ParameterBlock)rop.getParameterBlock());

  return SerializerFactory.getState(r2D, null);
    }
View Full Code Here

TOP

Related Classes of javax.media.jai.RenderableOp

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.