本文整理汇总了Java中javax.media.jai.ParameterBlockJAI类的典型用法代码示例。如果您正苦于以下问题:Java ParameterBlockJAI类的具体用法?Java ParameterBlockJAI怎么用?Java ParameterBlockJAI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParameterBlockJAI类属于javax.media.jai包,在下文中一共展示了ParameterBlockJAI类的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;
}
示例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);
}
示例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);
}
示例4: create
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* Render the Equalization of pixels of 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 hints processing image hints.
* @param sources list of sources.
* @return The <code>RenderedOp</code> destination.
* @throws IllegalArgumentException if <code>sources</code> is <code>null</code>.
* @throws IllegalArgumentException if a <code>source</code> is <code>null</code>.
*/
public static RenderedOp create(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);
}
return JAI.create(OPERATION_NAME, pb, hints);
}
示例5: createRenderable
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* Subsamples an image by averaging over a moving window.
*
* <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 scaleX The X scale factor.
* May be <code>null</code>.
* @param scaleY The Y scale factor.
* 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 scaleX,
Double scaleY,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("SubsampleAverage",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setParameter("scaleX", scaleX);
pb.setParameter("scaleY", scaleY);
return JAI.createRenderable("SubsampleAverage", pb, hints);
}
示例6: createRenderable
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* Composites two images based on an alpha mask.
*
* <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 source1 <code>RenderableImage</code> source 1.
* @param source1Alpha The alpha image for the first source.
* @param source2Alpha The alpha image for the second source.
* May be <code>null</code>.
* @param alphaPremultiplied True if alpha has been premultiplied to both sources and the destination.
* May be <code>null</code>.
* @param destAlpha Indicates if the destination image should include an extra alpha channel, and if so, should it be the first or last band.
* 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>.
* @throws IllegalArgumentException if <code>source1</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>source1Alpha</code> is <code>null</code>.
*/
public static RenderableOp createRenderable(RenderableImage source0,
RenderableImage source1,
RenderableImage source1Alpha,
RenderableImage source2Alpha,
Boolean alphaPremultiplied,
CompositeDestAlpha destAlpha,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Composite",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setSource("source1", source1);
pb.setParameter("source1Alpha", source1Alpha);
pb.setParameter("source2Alpha", source2Alpha);
pb.setParameter("alphaPremultiplied", alphaPremultiplied);
pb.setParameter("destAlpha", destAlpha);
return JAI.createRenderable("Composite", pb, hints);
}
示例7: createRenderable
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* Computes the discrete cosine 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 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,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("DCT",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
return JAI.createRenderable("DCT", pb, hints);
}
示例8: createRenderable
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* Clamps the pixel values of an image to a specified 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 low The lower boundary for each band.
* May be <code>null</code>.
* @param high The upper boundary for each band.
* 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[] low,
double[] high,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Clamp",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setParameter("low", low);
pb.setParameter("high", high);
return JAI.createRenderable("Clamp", pb, hints);
}
示例9: createRenderable
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* Resizes 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 xScale The X scale factor.
* May be <code>null</code>.
* @param yScale The Y scale factor.
* May be <code>null</code>.
* @param xTrans The X translation.
* May be <code>null</code>.
* @param yTrans The Y translation.
* May be <code>null</code>.
* @param interpolation The interpolation method for resampling.
* 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 xScale,
Float yScale,
Float xTrans,
Float yTrans,
Interpolation interpolation,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Scale",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setParameter("xScale", xScale);
pb.setParameter("yScale", yScale);
pb.setParameter("xTrans", xTrans);
pb.setParameter("yTrans", yTrans);
pb.setParameter("interpolation", interpolation);
return JAI.createRenderable("Scale", pb, hints);
}
示例10: createRenderable
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* Maps the pixels whose value falls between a low value and a high value to a constant.
*
* <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 low The low value.
* @param high The high value.
* @param constants The constant the pixels are mapped to.
* @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>low</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>high</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>constants</code> is <code>null</code>.
*/
public static RenderableOp createRenderable(RenderableImage source0,
double[] low,
double[] high,
double[] constants,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Threshold",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setParameter("low", low);
pb.setParameter("high", high);
pb.setParameter("constants", constants);
return JAI.createRenderable("Threshold", pb, hints);
}
示例11: create
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* Composites two images based on an alpha mask.
*
* <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 source1 <code>RenderedImage</code> source 1.
* @param source1Alpha The alpha image for the first source.
* @param source2Alpha The alpha image for the second source.
* May be <code>null</code>.
* @param alphaPremultiplied True if alpha has been premultiplied to both sources and the destination.
* May be <code>null</code>.
* @param destAlpha Indicates if the destination image should include an extra alpha channel, and if so, should it be the first or last band.
* 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>.
* @throws IllegalArgumentException if <code>source1</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>source1Alpha</code> is <code>null</code>.
*/
public static RenderedOp create(RenderedImage source0,
RenderedImage source1,
RenderedImage source1Alpha,
RenderedImage source2Alpha,
Boolean alphaPremultiplied,
CompositeDestAlpha destAlpha,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Composite",
RenderedRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setSource("source1", source1);
pb.setParameter("source1Alpha", source1Alpha);
pb.setParameter("source2Alpha", source2Alpha);
pb.setParameter("alphaPremultiplied", alphaPremultiplied);
pb.setParameter("destAlpha", destAlpha);
return JAI.create("Composite", pb, hints);
}
示例12: createRenderable
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* An operation which does no processing.
*
* <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 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,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Null",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
return JAI.createRenderable("Null", pb, hints);
}
示例13: create
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* Generates an image from a functional description.
*
* <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 function The functional description.
* @param width The image width.
* @param height The image height.
* @param xScale The X scale factor.
* May be <code>null</code>.
* @param yScale The Y scale factor.
* May be <code>null</code>.
* @param xTrans The X translation.
* May be <code>null</code>.
* @param yTrans The Y translation.
* 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>function</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(ImageFunction function,
Integer width,
Integer height,
Float xScale,
Float yScale,
Float xTrans,
Float yTrans,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("ImageFunction",
RenderedRegistryMode.MODE_NAME);
pb.setParameter("function", function);
pb.setParameter("width", width);
pb.setParameter("height", height);
pb.setParameter("xScale", xScale);
pb.setParameter("yScale", yScale);
pb.setParameter("xTrans", xTrans);
pb.setParameter("yTrans", yTrans);
return JAI.create("ImageFunction", pb, hints);
}
示例14: create
import javax.media.jai.ParameterBlockJAI; //导入依赖的package包/类
/**
* Subsamples an image by averaging over a moving window.
*
* <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 scaleX The X scale factor.
* May be <code>null</code>.
* @param scaleY The Y scale factor.
* 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,
Double scaleX,
Double scaleY,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("SubsampleAverage",
RenderedRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setParameter("scaleX", scaleX);
pb.setParameter("scaleY", scaleY);
return JAI.create("SubsampleAverage", pb, hints);
}
示例15: createRenderable
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#createRenderable(String,ParameterBlock,RenderingHints)}.
*
* @see JAI
* @see ParameterBlockJAI
* @see RenderableOp
*
* @param source0 <code>RenderableImage</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>RenderableOp</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 RenderableOp createRenderable(RenderableImage source0,
Float x,
Float y,
Float width,
Float height,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Crop",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setParameter("x", x);
pb.setParameter("y", y);
pb.setParameter("width", width);
pb.setParameter("height", height);
return JAI.createRenderable("Crop", pb, hints);
}