javax.media.jai.operator
Class XorDescriptor
java.lang.Object
|
+--javax.media.jai.OperationDescriptorImpl
|
+--javax.media.jai.operator.XorDescriptor
- All Implemented Interfaces:
- OperationDescriptor, RegistryElementDescriptor, Serializable
- public class XorDescriptor
- extends OperationDescriptorImpl
An OperationDescriptor
describing the "Xor" operation.
The Xor operation takes two rendered or renderable images, and
performs bit-wise logical "xor" on every pair of pixels, one from
each source image of the corresponding position and band. No
additional parameters are required.
Both source images must have integral data types. The two
data types may be different.
Unless altered by an ImageLayout
hint, 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 height of 0. The number of bands of the
destination image is equal to the lesser 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.
The following matrix defines the "xor" operation.
Logical "xor"
src1 | src2 | Result |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
The destination pixel values are defined by the pseudocode:
dst[x][y][b] = srcs[0][x][y][b] ^ srcs[0][x][y][b];
Resource List
Name | Value |
GlobalName | Xor |
LocalName | Xor |
Vendor | com.sun.media.jai |
Description | Logically "xors" two rendered images. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/XorDescriptor.html |
Version | 1.0 |
No parameters are needed for this operation.
- See Also:
OperationDescriptor
, Serialized Form
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,
isRenderableSupported,
isRenderedSupported,
makeDefaultSourceClassList,
validateArguments,
validateArguments,
validateParameters,
validateParameters,
validateRenderableArguments,
validateRenderableSources,
validateSources |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
XorDescriptor
public XorDescriptor()
- Constructor.
validateSources
protected boolean validateSources(String modeName,
ParameterBlock args,
StringBuffer msg)
- Validates the input sources.
In addition to the standard checks performed by the
superclass method, this method checks that the source images
are of integral data type.
- Overrides:
- validateSources in class OperationDescriptorImpl
- Tags copied from class: OperationDescriptorImpl
- Parameters:
modeName
- the operation mode nameargs
- a ParameterBlock
that has the sourcesmsg
- A string that may contain error messages.- Throws:
- IllegalArgumentException - if any of the input parameters are
null
. - See Also:
OperationDescriptorImpl.validateArguments(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)