本文整理汇总了Java中javax.media.jai.ParameterBlockJAI.setSource方法的典型用法代码示例。如果您正苦于以下问题:Java ParameterBlockJAI.setSource方法的具体用法?Java ParameterBlockJAI.setSource怎么用?Java ParameterBlockJAI.setSource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.media.jai.ParameterBlockJAI
的用法示例。
在下文中一共展示了ParameterBlockJAI.setSource方法的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: create
import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
* Shears 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 shear The shear value.
* May be <code>null</code>.
* @param shearDir The shear direction.
* 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 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,
Float shear,
ShearDir shearDir,
Float xTrans,
Float yTrans,
Interpolation interpolation,
double[] backgroundValues,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Shear",
RenderedRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setParameter("shear", shear);
pb.setParameter("shearDir", shearDir);
pb.setParameter("xTrans", xTrans);
pb.setParameter("yTrans", yTrans);
pb.setParameter("interpolation", interpolation);
pb.setParameter("backgroundValues", backgroundValues);
return JAI.create("Shear", pb, hints);
}
示例6: create
import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
* Performs special case convolution where each source pixel contributes equally to the intensity of the destination pixel.
*
* <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 width The width of the box.
* May be <code>null</code>.
* @param height The height of the box.
* May be <code>null</code>.
* @param xKey The X position of the key element.
* May be <code>null</code>.
* @param yKey The Y position of the key element.
* 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,
Integer width,
Integer height,
Integer xKey,
Integer yKey,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("BoxFilter",
RenderedRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setParameter("width", width);
pb.setParameter("height", height);
pb.setParameter("xKey", xKey);
pb.setParameter("yKey", yKey);
return JAI.create("BoxFilter", pb, hints);
}
示例7: 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);
}
示例8: 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);
}
示例9: 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);
}
示例10: createRenderable
import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
* Subtracts an image from constants.
*
* <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 from.
* @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("SubtractFromConst",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setParameter("constants", constants);
return JAI.createRenderable("SubtractFromConst", pb, hints);
}
示例11: create
import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
* Logically "nots" 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 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,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Not",
RenderedRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
return JAI.create("Not", pb, hints);
}
示例12: createRenderable
import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
* Find the magnitude of each pixel 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("Magnitude",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
return JAI.createRenderable("Magnitude", pb, hints);
}
示例13: createRenderable
import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
* Multiplies two images.
*
* <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 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>.
*/
public static RenderableOp createRenderable(RenderableImage source0,
RenderableImage source1,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Multiply",
RenderableRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setSource("source1", source1);
return JAI.createRenderable("Multiply", pb, hints);
}
示例14: create
import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
* Computes a complex image from a magnitude and a phase 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 source1 <code>RenderedImage</code> source 1.
* @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>.
*/
public static RenderedOp create(RenderedImage source0,
RenderedImage source1,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("PolarToComplex",
RenderedRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setSource("source1", source1);
return JAI.create("PolarToComplex", pb, hints);
}
示例15: create
import javax.media.jai.ParameterBlockJAI; //导入方法依赖的package包/类
/**
* Performs binary kernel based Erode 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 binary convolution kernel.
* @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>kernel</code> is <code>null</code>.
*/
public static RenderedOp create(RenderedImage source0,
KernelJAI kernel,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("Erode",
RenderedRegistryMode.MODE_NAME);
pb.setSource("source0", source0);
pb.setParameter("kernel", kernel);
return JAI.create("Erode", pb, hints);
}