Class OrderedDitherDescriptor
- All Implemented Interfaces:
Serializable,OperationDescriptor,RegistryElementDescriptor
OperationDescriptor describing the "OrderedDither" operation.
The "OrderedDither" operation performs color quantization by finding the nearest color to each pixel in a supplied color cube and "shifting" the resulting index value by a pseudo-random amount determined by the values of a supplied dither mask.
The dither mask is supplied as an array of KernelImageN objects the length of which must equal the
number of bands in the image. Each element of the array is a KernelImageN object which represents the
dither mask matrix for the corresponding band. All KernelImageN objects in the array must have the same
dimensions and contain floating point values greater than or equal to 0.0 and less than or equal to 1.0.
For all integral data types, the source image samples are presumed to occupy the full range of the respective types. For floating point data types it is assumed that the data samples have been scaled to the range [0.0, 1.0].
Notice that it is possible to define a ROI object for reducing the computation area. Also it is possible
to define a Range of nodata for checking if a Pixel is a NoData one.
| Name | Value |
|---|---|
| GlobalName | OrderedDither |
| LocalName | OrderedDither |
| Vendor | org.eclipse.imagen.media |
| Description | Performs ordered dither color quantization taking into account ROI and NoData. |
| DocURL | |
| Version | 1.0 |
| arg0Desc | Input color cube. |
| arg1Desc | Input dither mask. |
| arg2Desc | The ROI to be used for reducing calculation area. |
| arg3Desc | The Nodata parameter to check. |
| arg4Desc | The destination nodata parameter used to substitute the old nodata one. |
| Name | Class Type | Default Value |
|---|---|---|
| colorMap | org.eclipse.imagen.ColorCube | ColorCube.BYTE_496 |
| ditherMask | org.eclipse.imagen.KernelImageN[] | KernelImageN.DITHER_MASK_443 |
| roi | org.eclipse.imagen.KernelImageN[] | null |
| nodata | org.eclipse.imagen.media.range | null |
| destNoData | Double | 0d |
- See Also:
-
Field Summary
Fields inherited from interface OperationDescriptor
NO_PARAMETER_DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RenderedOpcreate(RenderedImage source0, ColorCube colorMap, KernelImageN[] ditherMask, RenderingHints hints, ROI roi, Range nodata, Double destNoData) Performs ordered dither color quantization using a specified color cube and dither mask.booleanvalidateArguments(String modeName, ParameterBlock args, StringBuffer msg) Validates the input source and parameters.Methods inherited from class OperationDescriptorImpl
arePropertiesSupported, 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, validateArguments, validateRenderableArguments
-
Constructor Details
-
OrderedDitherDescriptor
public OrderedDitherDescriptor()Constructor.
-
-
Method Details
-
validateArguments
Validates the input source and parameters.In addition to the standard checks performed by the superclass method, this method checks that "colorMap" and "ditherMask" are valid for the given source image.
- Specified by:
validateArgumentsin interfaceOperationDescriptor- Overrides:
validateArgumentsin classOperationDescriptorImpl- Parameters:
modeName- the operation mode nameargs- Input arguments, including source(s) and/or parameter(s).msg- A string that may contain error messages.- See Also:
-
OperationDescriptorImpl.validateSources(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)OperationDescriptorImpl.validateParameters(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
-
create
public static RenderedOp create(RenderedImage source0, ColorCube colorMap, KernelImageN[] ditherMask, RenderingHints hints, ROI roi, Range nodata, Double destNoData) Performs ordered dither color quantization using a specified color cube and dither mask.Creates a
ParameterBlockImageNfrom all supplied arguments excepthintsand invokesImageN.create(String,ParameterBlock,RenderingHints).- Parameters:
source0-RenderedImagesource 0.colorMap- The color cube. May benull.ditherMask- The dither mask. May benull.hints- TheRenderingHintsto use. May benull.roi- Optional ROI object used for reducing computationnodata- Optional Range used for checking NoDatadestNoData- Value related to the Output NoData- Returns:
- The
RenderedOpdestination. - See Also:
-