javax.media.jai.operator
Class AddDescriptor

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

public class AddDescriptor
extends OperationDescriptorImpl

An OperationDescriptor describing the "Add" operation.

The Add operation takes two rendered or renderable source images, and adds every pair of pixels, one from each source image of the corresponding position and band. No additional parameters are required.

The two source images may have different numbers of bands and data types. By default, the destination image bounds are the intersection of the two source image bounds. If the sources don't intersect, the destination will have a width and height of 0.

The default number of bands of the destination image is equal to the smallest number of bands of the sources, and the data type is the smallest data type with sufficient range to cover the range of both source data types (not necessarily the range of their sums).

As a special case, if one of the source images has N bands (N > 1), the other source has 1 band, and an ImageLayout hint is provided containing a destination SampleModel with K bands (1 < K <= N), then the single band of the 1-banded source is added to each of the first K bands of the N-band source.

If the result of the operation underflows/overflows the minimum/maximum value supported by the destination data type, then it will be clamped to the minimum/maximum value respectively.

The destination pixel values are defined by the pseudocode:

 dst[x][y][dstBand] = clamp(srcs[0][x][y][src0Band] +
                            srcs[1][x][y][src1Band]);
 

Resource List
Name Value
GlobalName Add
LocalName Add
Vendor com.sun.media.jai
Description Adds two rendered images.
DocURL http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/AddDescriptor.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
 
Constructor Summary
AddDescriptor()
          Constructor.
 
Method Summary
 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

AddDescriptor

public AddDescriptor()
Constructor.
Method Detail

isRenderableSupported

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