javax.media.jai.operator
Class MultiplyConstDescriptor
java.lang.Object
|
+--javax.media.jai.OperationDescriptorImpl
|
+--javax.media.jai.operator.MultiplyConstDescriptor
- All Implemented Interfaces:
- OperationDescriptor, RegistryElementDescriptor, Serializable
- public class MultiplyConstDescriptor
- extends OperationDescriptorImpl
An OperationDescriptor
describing the
"MultiplyConst" operation.
The MultiplyConst operation takes one rendered or renderable
image and an array of double constants, and multiplies every pixel
of the same band of the source by the constant from the
corresponding array entry. If the number of constants supplied is
less than the number of bands of the destination, then the constant
from entry 0 is applied to all the bands. Otherwise, a constant
from a different entry is applied to each band.
By default, the destination image bound, data type, and number of
bands are the same as the source image. 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 calculated as:
if (constants.length < dstNumBands) {
dst[x][y][b] = srcs[x][y][b]*constants[0];
} else {
dst[x][y][b] = srcs[x][y][b]*constants[b];
}
Resource List
Name | Value |
GlobalName | MultiplyConst |
LocalName | MultiplyConst |
Vendor | com.sun.media.jai |
Description | Multiplies a rendered image by
constants. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/MultiplyConstDescriptor.html |
Version | 1.0 |
arg0Desc | The constants to be multiplied. |
Parameter List
Name | Class Type |
Default Value |
constants | double[] |
NO_PARAMETER_DEFAULT |
- 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,
isRenderedSupported,
makeDefaultSourceClassList,
validateArguments,
validateArguments,
validateParameters,
validateRenderableArguments,
validateRenderableSources,
validateSources,
validateSources |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MultiplyConstDescriptor
public MultiplyConstDescriptor()
- Constructor.
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)
validateParameters
protected boolean validateParameters(ParameterBlock args,
StringBuffer message)
- Validates the input parameter.
In addition to the standard checks performed by the
superclass method, this method checks that the length of the
"constants" array is at least 1.
- Overrides:
- validateParameters in class OperationDescriptorImpl
- Tags copied from class: OperationDescriptorImpl
- Throws:
- IllegalArgumentException - if
args
is null
.- IllegalArgumentException - if
msg
is null
and the validation fails. - See Also:
OperationDescriptorImpl.validateParameters(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)