javax.media.jai.operator
Class MinDescriptor

java.lang.Object
  |
  +--javax.media.jai.OperationDescriptorImpl
        |
        +--javax.media.jai.operator.MinDescriptor
All Implemented Interfaces:
OperationDescriptor, RegistryElementDescriptor, Serializable

public class MinDescriptor
extends OperationDescriptorImpl

An OperationDescriptor describing the "Min" operation.

The Min operation takes two rendered or renderable images, and for every pair of pixels, one from each source image of the corresponding position and band, finds the minimum pixel value. No additional parameters are required.

The two sources may have different number of bands and/or data types. By default, the destination image bound is the intersection of the two source image bounds. If the two sources don't intersect, the destination will have a width and a height of 0. The number of bands of the destination image is the same as the least number of bands of the sources, and the data type is the biggest data type of the sources.

The destination pixel values are defined by the pseudocode:

 if (srcs[0][x][y][b] < srcs[1][x][y][b]) {
     dst[x][y][b] = srcs[0][x][y][b];
 } else {
     dst[x][y][b] = srcs[1][x][y][b];
 }
 

Resource List
Name Value
GlobalName Min
LocalName Min
Vendor com.sun.media.jai
Description Computes the pixel-wise minimum of two images.
DocURL http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/MinDescriptor.html
Version 1.0

No parameters are needed for this operation.

See Also:
OperationDescriptor, Serialized Form

Fields inherited from class javax.media.jai.OperationDescriptorImpl
resources, sourceNames, supportedModes
 
Fields inherited from interface javax.media.jai.OperationDescriptor
NO_PARAMETER_DEFAULT
 
Constructor Summary
MinDescriptor()
          Constructor.
 
Method Summary
static RenderedOp create(RenderedImage source0, RenderedImage source1, RenderingHints hints)
          Computes the pixel-wise minimum of two images.
static RenderableOp createRenderable(RenderableImage source0, RenderableImage source1, RenderingHints hints)
          Computes the pixel-wise minimum of two images.
 boolean isRenderableSupported()
          Returns true since renderable operation is supported.
 
Methods inherited from class javax.media.jai.OperationDescriptorImpl
arePropertiesSupported, getDefaultSourceClass, getDestClass, getDestClass, getInvalidRegion, getName, getNumParameters, getNumSources, getParamClasses, getParamDefaults, getParamDefaultValue, getParameterListDescriptor, getParamMaxValue, getParamMinValue, getParamNames, getPropertyGenerators, getPropertyGenerators, getRenderableDestClass, getRenderableSourceClasses, getResourceBundle, getResources, getSourceClasses, getSourceClasses, getSourceNames, getSupportedModes, isImmediate, isModeSupported, isRenderedSupported, makeDefaultSourceClassList, validateArguments, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinDescriptor

public MinDescriptor()
Constructor.
Method Detail

isRenderableSupported

public boolean isRenderableSupported()
Returns true since renderable operation is supported.
Overrides:
isRenderableSupported in class OperationDescriptorImpl
Following copied from class: javax.media.jai.OperationDescriptorImpl
See Also:
OperationDescriptorImpl.isModeSupported(java.lang.String)

create

public static RenderedOp create(RenderedImage source0,
                                RenderedImage source1,
                                RenderingHints hints)
Computes the pixel-wise minimum of two images.

Creates a ParameterBlockJAI from all supplied arguments except hints and invokes JAI.create(String,ParameterBlock,RenderingHints).

Parameters:
source0 - RenderedImage source 0.
source1 - RenderedImage source 1.
hints - The RenderingHints to use. May be null.
Returns:
The RenderedOp destination.
Throws:
IllegalArgumentException - if source0 is null.
IllegalArgumentException - if source1 is null.
See Also:
JAI, ParameterBlockJAI, RenderedOp

createRenderable

public static RenderableOp createRenderable(RenderableImage source0,
                                            RenderableImage source1,
                                            RenderingHints hints)
Computes the pixel-wise minimum of two images.

Creates a ParameterBlockJAI from all supplied arguments except hints and invokes JAI.createRenderable(String,ParameterBlock,RenderingHints).

Parameters:
source0 - RenderableImage source 0.
source1 - RenderableImage source 1.
hints - The RenderingHints to use. May be null.
Returns:
The RenderableOp destination.
Throws:
IllegalArgumentException - if source0 is null.
IllegalArgumentException - if source1 is null.
See Also:
JAI, ParameterBlockJAI, RenderableOp