javax.media.jai.operator
Class AbsoluteDescriptor

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

public class AbsoluteDescriptor
extends OperationDescriptorImpl

An OperationDescriptor describing the "Absolute" operation.

The "Absolute" operation takes a single rendered or renderable source image, and computes the mathematical absolute value of each pixel:

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

For signed integral data types, the smallest value of the data type does not have a positive counterpart; such values will be left unchanged. This behavior parallels that of the Java unary minus operator (see The Java Language Specification, section 15.14.4).

Resource List
Name Value
GlobalName Absolute
LocalName Absolute
Vendor com.sun.media.jai
Description Replaces the pixel values of an image by their absolute values.
DocURL http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/AbsoluteDescriptor.html
Version 1.0

No parameters are needed for the "Absolute" 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
AbsoluteDescriptor()
          Constructor.
 
Method Summary
static RenderedOp create(RenderedImage source0, RenderingHints hints)
          Replaces the pixel values of an image by their absolute values.
static RenderableOp createRenderable(RenderableImage source0, RenderingHints hints)
          Replaces the pixel values of an image by their absolute values.
 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

AbsoluteDescriptor

public AbsoluteDescriptor()
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,
                                RenderingHints hints)
Replaces the pixel values of an image by their absolute values.

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

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

createRenderable

public static RenderableOp createRenderable(RenderableImage source0,
                                            RenderingHints hints)
Replaces the pixel values of an image by their absolute values.

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

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