| java.lang.Object javax.media.jai.OperationDescriptorImpl javax.media.jai.operator.ClampDescriptor
ClampDescriptor | public class ClampDescriptor extends OperationDescriptorImpl (Code) | | An OperationDescriptor describing the "Clamp" operation.
The Clamp operation takes one rendered or renderable source
image, and sets all the pixels whose value is below a "low" value
to that low value and all the pixels whose value is above a "high"
value to that high value. The pixels whose value is between the
"low" value and the "high" value are left unchanged.
A different set of "low" and "high" values may be applied to each
band of the source image, or the same set of "low" and "high" values
may be applied to all bands of the source. If the number of "low" and
"high" values supplied is less than the number of bands of the source,
then the values from entry 0 are applied to all the bands. Each "low"
value must be less than or equal to its corresponding "high" value.
The destination pixel values are defined by the pseudocode:
lowVal = (low.length < dstNumBands) ?
low[0] : low[b];
highVal = (high.length < dstNumBands) ?
high[0] : high[b];
if (src[x][y][b] < lowVal) {
dst[x][y][b] = lowVal;
} else if (src[x][y][b] > highVal) {
dst[x][y][b] = highVal;
} else {
dst[x][y][b] = src[x][y][b];
}
Resource List
Name | Value |
GlobalName | Clamp |
LocalName | Clamp |
Vendor | com.sun.media.jai |
Description | Clamps the pixel values of an image
to a specified range. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/ClampDescriptor.html |
Version | 1.0 |
arg0Desc | The lower boundary for each band. |
arg1Desc | The upper boundary for each band. |
Parameter List
Name | Class Type |
Default Value |
low | double[] |
{0.0} |
high | double[] |
{255.0} |
See Also: javax.media.jai.OperationDescriptor |
ClampDescriptor | public ClampDescriptor()(Code) | | Constructor.
|
create | public static RenderedOp create(RenderedImage source0, double[] low, double[] high, RenderingHints hints)(Code) | | Clamps the pixel values of an image to a specified range.
Creates a ParameterBlockJAI from all
supplied arguments except hints and invokes
JAI.create(StringParameterBlockRenderingHints) .
See Also: JAI See Also: ParameterBlockJAI See Also: RenderedOp Parameters: source0 - RenderedImage source 0. Parameters: low - The lower boundary for each band.May be null . Parameters: high - The upper boundary for each band.May be null . Parameters: hints - The RenderingHints to use.May be null . The RenderedOp destination. throws: IllegalArgumentException - if source0 is null . |
isRenderableSupported | public boolean isRenderableSupported()(Code) | | Returns true since renderable operation is supported.
|
validateParameters | protected boolean validateParameters(ParameterBlock args, StringBuffer msg)(Code) | | Validates the input parameters.
In addition to the standard checks performed by the
superclass method, this method checks that "low" and "high"
have length at least 1 and that each "low" value is less than
or equal to the corresponding "high" value.
|
Methods inherited from javax.media.jai.OperationDescriptorImpl | public boolean arePropertiesSupported()(Code)(Java Doc) protected static Class getDefaultSourceClass(String modeName)(Code)(Java Doc) public Class getDestClass(String modeName)(Code)(Java Doc) public Class getDestClass()(Code)(Java Doc) public Object getInvalidRegion(String modeName, ParameterBlock oldParamBlock, RenderingHints oldHints, ParameterBlock newParamBlock, RenderingHints newHints, OperationNode node)(Code)(Java Doc) public String getName()(Code)(Java Doc) public int getNumParameters()(Code)(Java Doc) public int getNumSources()(Code)(Java Doc) public Class[] getParamClasses()(Code)(Java Doc) public Object getParamDefaultValue(int index)(Code)(Java Doc) public Object[] getParamDefaults()(Code)(Java Doc) public Number getParamMaxValue(int index)(Code)(Java Doc) public Number getParamMinValue(int index)(Code)(Java Doc) public String[] getParamNames()(Code)(Java Doc) public ParameterListDescriptor getParameterListDescriptor(String modeName)(Code)(Java Doc) public PropertyGenerator[] getPropertyGenerators(String modeName)(Code)(Java Doc) public PropertyGenerator[] getPropertyGenerators()(Code)(Java Doc) public Class getRenderableDestClass()(Code)(Java Doc) public Class[] getRenderableSourceClasses()(Code)(Java Doc) public ResourceBundle getResourceBundle(Locale locale)(Code)(Java Doc) public String[][] getResources(Locale locale)(Code)(Java Doc) public Class[] getSourceClasses(String modeName)(Code)(Java Doc) public Class[] getSourceClasses()(Code)(Java Doc) public String[] getSourceNames()(Code)(Java Doc) public String[] getSupportedModes()(Code)(Java Doc) public boolean isImmediate()(Code)(Java Doc) public boolean isModeSupported(String modeName)(Code)(Java Doc) public boolean isRenderableSupported()(Code)(Java Doc) public boolean isRenderedSupported()(Code)(Java Doc) protected static Class[][] makeDefaultSourceClassList(String[] supportedModes, int numSources)(Code)(Java Doc) public boolean validateArguments(String modeName, ParameterBlock args, StringBuffer msg)(Code)(Java Doc) public boolean validateArguments(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateParameters(String modeName, ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateParameters(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) public boolean validateRenderableArguments(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateRenderableSources(ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateSources(String modeName, ParameterBlock args, StringBuffer msg)(Code)(Java Doc) protected boolean validateSources(ParameterBlock args, StringBuffer msg)(Code)(Java Doc)
|
|
|