当前位置: 首页>>代码示例>>Java>>正文


Java ParameterBlockJAI.setParameter方法代码示例

本文整理汇总了Java中javax.media.jai.ParameterBlockJAI.setParameter方法的典型用法代码示例。如果您正苦于以下问题:Java ParameterBlockJAI.setParameter方法的具体用法?Java ParameterBlockJAI.setParameter怎么用?Java ParameterBlockJAI.setParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.media.jai.ParameterBlockJAI的用法示例。


在下文中一共展示了ParameterBlockJAI.setParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doVectorize

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Helper function to run the Vectorize operation with given parameters and
 * retrieve the vectors.
 * 
 * @param src the source image
 * @param args a {@code Map} of parameter names and values
 * 
 * @return the generated vectors as JTS Polygons
 */
@SuppressWarnings("unchecked")
private Collection<Polygon> doVectorize( RenderedImage src, Map<String, Object> args ) {
    ParameterBlockJAI pb = new ParameterBlockJAI("Vectorize");
    pb.setSource("source0", src);

    // Set any parameters that were passed in
    for( Entry<String, Object> e : args.entrySet() ) {
        pb.setParameter(e.getKey(), e.getValue());
    }

    // Get the desintation image: this is the unmodified source image data
    // plus a property for the generated vectors
    RenderedOp dest = JAI.create("Vectorize", pb);

    // Get the vectors
    Object property = dest.getProperty(VectorizeDescriptor.VECTOR_PROPERTY_NAME);
    return (Collection<Polygon>) property;
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:28,代码来源:OmsVectorizer.java

示例2: create

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Create the Render Operator to compute SLSTR quicklook.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#create(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderedOp
 *
 * @return The <code>RenderedOp</code> destination.
 * @throws IllegalArgumentException if sources is null.
 * @throws IllegalArgumentException if a source is null.
 */
public static RenderedOp create(PixelCorrection[]pixels_correction,
   RenderingHints hints, RenderedImage... sources)
{
   ParameterBlockJAI pb =
      new ParameterBlockJAI(OPERATION_NAME,
            RenderedRegistryMode.MODE_NAME);

   int numSources = sources.length;
   // Check on the source number
   if (numSources <= 0)
   {
      throw new IllegalArgumentException("No resources are present");
   }
   
   // Setting of all the sources
   for (int index = 0; index < numSources; index++)
   {
      RenderedImage source = sources[index];
      if (source == null)
      {
         throw new IllegalArgumentException("This resource is null");
      }
      pb.setSource(source, index);
      pb.setParameter(paramNames[0], pixels_correction);
   }
   return JAI.create(OPERATION_NAME, pb, hints);
}
 
开发者ID:SentinelDataHub,项目名称:DataHubSystem,代码行数:43,代码来源:QuicklookSlstrDescriptor.java

示例3: create

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Create the Render Operator to compute Olci quicklook.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#create(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderedOp
 *
 * @param source_red the RenderedImage red source.
 * @param source_green the RenderedImage green source.
 * @param source_blue the RenderedImage blue source.
 * @param detectors list of detector indexes.
 * @param sza list of solar zenith angles.
 * @param solar_flux list of solar flux.
 * @param pixels_correction per bands scale/offset pixels correction
 * @param bands list of bands in the order they are provided.
 * @param bands_coefficients list of global coefficient per bands.
 * @return The <code>RenderedOp</code> destination.
 * @throws IllegalArgumentException if sources is null.
 * @throws IllegalArgumentException if a source is null.
 */
public static RenderedOp create(short[][] detectors, double[][]sza, 
   float[][]solar_flux, PixelCorrection[]pixels_correction, int[]bands,
   int[]bands_coefficients, RenderingHints hints, RenderedImage... sources)
{
   ParameterBlockJAI pb =
      new ParameterBlockJAI(OPERATION_NAME,
            RenderedRegistryMode.MODE_NAME);

   int numSources = sources.length;
   // Check on the source number
   if (numSources <= 0)
   {
      throw new IllegalArgumentException("No resources are present");
   }
   
   // Setting of all the sources
   for (int index = 0; index < numSources; index++)
   {
      RenderedImage source = sources[index];
      if (source == null)
      {
         throw new IllegalArgumentException("This resource is null");
      }
      pb.setSource(source, index);
   }
   /*To Be remove */
   pb.setParameter(paramNames[0], detectors);
   pb.setParameter(paramNames[1], sza);
   pb.setParameter(paramNames[2], solar_flux);
   pb.setParameter(paramNames[3], pixels_correction);
   pb.setParameter(paramNames[4], bands);
   pb.setParameter(paramNames[5], bands_coefficients);
   
   return JAI.create(OPERATION_NAME, pb, hints);
}
 
开发者ID:SentinelDataHub,项目名称:DataHubSystem,代码行数:60,代码来源:QuicklookOlciDescriptor.java

示例4: create

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Performs min filtering on an image.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#create(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderedOp
 *
 * @param source0 <code>RenderedImage</code> source 0.
 * @param maskShape The shape of the mask to be used for Min Filtering.
 * May be <code>null</code>.
 * @param maskSize The size (width/height) of the mask to be used in Min Filtering.
 * May be <code>null</code>.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderedOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 */
public static RenderedOp create(RenderedImage source0,
                                MinFilterShape maskShape,
                                Integer maskSize,
                                RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("MinFilter",
                              RenderedRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("maskShape", maskShape);
    pb.setParameter("maskSize", maskSize);

    return JAI.create("MinFilter", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:37,代码来源:MinFilterDescriptor.java

示例5: create

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Computes the inverse discrete Fourier transform of an image.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#create(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderedOp
 *
 * @param source0 <code>RenderedImage</code> source 0.
 * @param scalingType The type of scaling to perform.
 * May be <code>null</code>.
 * @param dataNature The nature of the data.
 * May be <code>null</code>.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderedOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 */
public static RenderedOp create(RenderedImage source0,
                                DFTScalingType scalingType,
                                DFTDataNature dataNature,
                                RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("IDFT",
                              RenderedRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("scalingType", scalingType);
    pb.setParameter("dataNature", dataNature);

    return JAI.create("IDFT", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:37,代码来源:IDFTDescriptor.java

示例6: createRenderable

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Moves an image to a new location.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#createRenderable(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderableOp
 *
 * @param source0 <code>RenderableImage</code> source 0.
 * @param xTrans The displacement in X direction.
 * May be <code>null</code>.
 * @param yTrans The displacement in Y direction.
 * May be <code>null</code>.
 * @param interpolation The interpolation method.
 * May be <code>null</code>.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderableOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 */
public static RenderableOp createRenderable(RenderableImage source0,
                                            Float xTrans,
                                            Float yTrans,
                                            Interpolation interpolation,
                                            RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("Translate",
                              RenderableRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("xTrans", xTrans);
    pb.setParameter("yTrans", yTrans);
    pb.setParameter("interpolation", interpolation);

    return JAI.createRenderable("Translate", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:41,代码来源:TranslateDescriptor.java

示例7: create

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Computes the discrete Fourier transform of an image.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#create(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderedOp
 *
 * @param source0 <code>RenderedImage</code> source 0.
 * @param scalingType The type of scaling to perform.
 * May be <code>null</code>.
 * @param dataNature The nature of the data.
 * May be <code>null</code>.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderedOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 */
public static RenderedOp create(RenderedImage source0,
                                DFTScalingType scalingType,
                                DFTDataNature dataNature,
                                RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("DFT",
                              RenderedRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("scalingType", scalingType);
    pb.setParameter("dataNature", dataNature);

    return JAI.create("DFT", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:37,代码来源:DFTDescriptor.java

示例8: create

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Performs cropping to a specified bounding box.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#create(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderedOp
 *
 * @param source0 <code>RenderedImage</code> source 0.
 * @param x The x origin of the cropping operation.
 * @param y The y origin of the cropping operation.
 * @param width The width of the cropping operation.
 * @param height The height of the cropping operation.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderedOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 * @throws IllegalArgumentException if <code>x</code> is <code>null</code>.
 * @throws IllegalArgumentException if <code>y</code> is <code>null</code>.
 * @throws IllegalArgumentException if <code>width</code> is <code>null</code>.
 * @throws IllegalArgumentException if <code>height</code> is <code>null</code>.
 */
public static RenderedOp create(RenderedImage source0,
                                Float x,
                                Float y,
                                Float width,
                                Float height,
                                RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("Crop",
                              RenderedRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("x", x);
    pb.setParameter("y", y);
    pb.setParameter("width", width);
    pb.setParameter("height", height);

    return JAI.create("Crop", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:45,代码来源:CropDescriptor.java

示例9: createRenderable

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Subtracts constants from an image.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#createRenderable(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderableOp
 *
 * @param source0 <code>RenderableImage</code> source 0.
 * @param constants The constants to be subtracted.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderableOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 * @throws IllegalArgumentException if <code>constants</code> is <code>null</code>.
 */
public static RenderableOp createRenderable(RenderableImage source0,
                                            double[] constants,
                                            RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("SubtractConst",
                              RenderableRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("constants", constants);

    return JAI.createRenderable("SubtractConst", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:33,代码来源:SubtractConstDescriptor.java

示例10: create

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * To subsamples binary image to gray; reverse of dithering.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#create(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderedOp
 *
 * @param source0 <code>RenderedImage</code> source 0.
 * @param xScale scaleX must be between 0 and 1, excluding 0.
 * May be <code>null</code>.
 * @param yScale scaleY must be between 0 and 1, excluding 0.
 * May be <code>null</code>.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderedOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 */
public static RenderedOp create(RenderedImage source0,
                                Float xScale,
                                Float yScale,
                                RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("SubsampleBinaryToGray",
                              RenderedRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("xScale", xScale);
    pb.setParameter("yScale", yScale);

    return JAI.create("SubsampleBinaryToGray", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:37,代码来源:SubsampleBinaryToGrayDescriptor.java

示例11: create

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Performs UnsharpMask operation on the image.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#create(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderedOp
 *
 * @param source0 <code>RenderedImage</code> source 0.
 * @param kernel The low-pass convolution kernel.
 * May be <code>null</code>.
 * @param gain The sharpening value.
 * May be <code>null</code>.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderedOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 */
public static RenderedOp create(RenderedImage source0,
                                KernelJAI kernel,
                                Float gain,
                                RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("UnsharpMask",
                              RenderedRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("kernel", kernel);
    pb.setParameter("gain", gain);

    return JAI.create("UnsharpMask", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:37,代码来源:UnsharpMaskDescriptor.java

示例12: createRenderable

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Computes the inverse discrete Fourier transform of an image.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#createRenderable(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderableOp
 *
 * @param source0 <code>RenderableImage</code> source 0.
 * @param scalingType The type of scaling to perform.
 * May be <code>null</code>.
 * @param dataNature The nature of the data.
 * May be <code>null</code>.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderableOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 */
public static RenderableOp createRenderable(RenderableImage source0,
                                            DFTScalingType scalingType,
                                            DFTDataNature dataNature,
                                            RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("IDFT",
                              RenderableRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("scalingType", scalingType);
    pb.setParameter("dataNature", dataNature);

    return JAI.createRenderable("IDFT", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:37,代码来源:IDFTDescriptor.java

示例13: create

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Performs interpolated affine transform on an image.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#create(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderedOp
 *
 * @param source0 <code>RenderedImage</code> source 0.
 * @param transform The affine transform matrix.
 * May be <code>null</code>.
 * @param interpolation The interpolation method.
 * May be <code>null</code>.
 * @param backgroundValues The user-specified background values.
 * May be <code>null</code>.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderedOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 */
public static RenderedOp create(RenderedImage source0,
                                AffineTransform transform,
                                Interpolation interpolation,
                                double[] backgroundValues,
                                RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("Affine",
                              RenderedRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("transform", transform);
    pb.setParameter("interpolation", interpolation);
    pb.setParameter("backgroundValues", backgroundValues);

    return JAI.create("Affine", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:41,代码来源:AffineDescriptor.java

示例14: createRenderable

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Reformats an image.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#createRenderable(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderableOp
 *
 * @param source0 <code>RenderableImage</code> source 0.
 * @param dataType The output data type (from java.awt.image.DataBuffer).
 * May be <code>null</code>.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderableOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 */
public static RenderableOp createRenderable(RenderableImage source0,
                                            Integer dataType,
                                            RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("Format",
                              RenderableRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("dataType", dataType);

    return JAI.createRenderable("Format", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:33,代码来源:FormatDescriptor.java

示例15: createRenderable

import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
 * Maps the pixels values of an image from one range to another range.
 *
 * <p>Creates a <code>ParameterBlockJAI</code> from all
 * supplied arguments except <code>hints</code> and invokes
 * {@link JAI#createRenderable(String,ParameterBlock,RenderingHints)}.
 *
 * @see JAI
 * @see ParameterBlockJAI
 * @see RenderableOp
 *
 * @param source0 <code>RenderableImage</code> source 0.
 * @param constants The per-band constants to multiply by.
 * May be <code>null</code>.
 * @param offsets The per-band offsets to be added.
 * May be <code>null</code>.
 * @param hints The <code>RenderingHints</code> to use.
 * May be <code>null</code>.
 * @return The <code>RenderableOp</code> destination.
 * @throws IllegalArgumentException if <code>source0</code> is <code>null</code>.
 */
public static RenderableOp createRenderable(RenderableImage source0,
                                            double[] constants,
                                            double[] offsets,
                                            RenderingHints hints)  {
    ParameterBlockJAI pb =
        new ParameterBlockJAI("Rescale",
                              RenderableRegistryMode.MODE_NAME);

    pb.setSource("source0", source0);

    pb.setParameter("constants", constants);
    pb.setParameter("offsets", offsets);

    return JAI.createRenderable("Rescale", pb, hints);
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:37,代码来源:RescaleDescriptor.java


注:本文中的javax.media.jai.ParameterBlockJAI.setParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。