| java.lang.Object javax.media.jai.OperationDescriptorImpl ca.forklabs.media.jai.operator.AutoRescaleDescriptor
AutoRescaleDescriptor | public class AutoRescaleDescriptor extends OperationDescriptorImpl (Code) | | Class
AutoRescaleDescriptor is an
OperationDescriptor describing the autorescale operation. This operation is a
simplification of the rescale operator such that the calculation of
the offsets and the constants are made from a range of values.
The autorescale operation takes two parameters, the lower bounds and
the upper bands of the range.
If a band of the image is constant, that is all the values are the same, the
new values of said band will be (upperbounds - lowerbounds) / 2.
Resource List
Name | Value |
GlobalName | AutoRescale |
LocalName | AutoRescale |
Vendor | ca.forklabs.media.jai.opimage |
Description | Rescale made easier |
DocURL | n/a |
Version | $Version$ |
Arg0Desct | The lower bounds of the range |
Arg1Desct | The upper bounds of the range |
Parameter List
Name | Class Type | Default Value |
lowerbounds | double[] | new double[] { 0.0, } |
upperbounds | double[] | new double[] { 255.0, } |
author: Daniel Léonard version: $Revision: 1.3 $ |
Method Summary | |
public static RenderedOp | create(RenderedImage source, double[] lower_bounds, double[] upper_bounds, RenderingHints hints) Performs the autorescale operation on a rendered image.
Parameters: source - the image to enhance. Parameters: lower_bounds - the lower bound. Parameters: upper_bounds - the upper bound. Parameters: hints - the rendering hints, may be null . | protected static ParameterBlockJAI | createParameterBlock(String mode, Object source, double[] lower_bounds, double[] upper_bounds) Creates and fills a new parameter block.
Parameters: mode - the rendering mode. Parameters: source - the source image. Parameters: lower_bounds - the lower bound. Parameters: upper_bounds - the upper bound. | public static ParameterBlockJAI | createParameterBlock(RenderedImage source, double[] lower_bounds, double[] upper_bounds) Creates and fills a new parameter block for the rendered mode.
Parameters: source - the source image. Parameters: lower_bounds - the lower bound. Parameters: upper_bounds - the upper bound. | public static ParameterBlockJAI | createParameterBlock(RenderableImage source, double[] lower_bounds, double[] upper_bounds) Creates and fills a new parameter block for the renderable mode.
Parameters: source - the source image. Parameters: lower_bounds - the lower bound. Parameters: upper_bounds - the upper bound. | public static RenderableOp | createRenderable(RenderableImage source, double[] lower_bounds, double[] upper_bounds, RenderingHints hints) Performs the autorescale operation on a renderable image.
Parameters: source - the image to enhance. Parameters: lower_bounds - the lower bound. Parameters: upper_bounds - the upper bound. Parameters: hints - the rendering hints, may be null . | protected static String | getArg0Description() Gets the description for the first argument, the lower bounds. | protected static String | getArg1Description() Gets the description for the second argument, the upper bounds. | protected static String | getDescription() Gets the description of this operation. | protected String | getLowerBoundGreaterThanUpperBoundErrorMessage(double lower_bound, double upper_bound) Gets the error message saying a lower bound is greater than its upper bound.
Parameters: lower_bound - the lower bound. Parameters: upper_bound - the upper bound. | protected String | getNoLowerBounds() Gets the error message saying that there are no lower bounds. | protected String | getNoUpperBounds() Gets the error message saying that there are no upper bounds. | protected String | getNotSameNumberOfBoundsErrorMessage(int lower_bound_len, int upper_bound_len) Gets the error message saying a there are not the same number of lower
bound and upper bounds.
Parameters: lower_bound_len - the lower bounds. Parameters: upper_bound_len - the upper bounds. | protected boolean | validateParameters(String mode, ParameterBlock pb, StringBuffer sb) Validates that the lower bound is smaller than or equal to the upper
bound.
Parameters: mode - the rendering mode. Parameters: pb - the parameter block. Parameters: sb - string buffer for error messages. |
LOWER_BOUND_DEFAULT_VALUE | final public static double LOWER_BOUND_DEFAULT_VALUE(Code) | | The lower bound default value.
|
LOWER_BOUND_PARAMETER_INDEX | final public static int LOWER_BOUND_PARAMETER_INDEX(Code) | | The index in the parameter block of the lower bound parameter.
|
LOWER_BOUND_PARAMETER_NAME | final public static String LOWER_BOUND_PARAMETER_NAME(Code) | | The name of the lower bound parameter.
|
NAME | final public static String NAME(Code) | | The name of this operator.
|
UPPER_BOUND_DEFAULT_VALUE | final public static double UPPER_BOUND_DEFAULT_VALUE(Code) | | The upper bound default value.
|
UPPER_BOUND_PARAMETER_INDEX | final public static int UPPER_BOUND_PARAMETER_INDEX(Code) | | The index in the parameter block of the upper bound parameter.
|
UPPER_BOUND_PARAMETER_NAME | final public static String UPPER_BOUND_PARAMETER_NAME(Code) | | The name of the upper bound parameter.
|
AutoRescaleDescriptor | public AutoRescaleDescriptor()(Code) | | Constructor.
|
create | public static RenderedOp create(RenderedImage source, double[] lower_bounds, double[] upper_bounds, RenderingHints hints)(Code) | | Performs the autorescale operation on a rendered image.
Parameters: source - the image to enhance. Parameters: lower_bounds - the lower bound. Parameters: upper_bounds - the upper bound. Parameters: hints - the rendering hints, may be null . the rendered result image. |
createParameterBlock | protected static ParameterBlockJAI createParameterBlock(String mode, Object source, double[] lower_bounds, double[] upper_bounds)(Code) | | Creates and fills a new parameter block.
Parameters: mode - the rendering mode. Parameters: source - the source image. Parameters: lower_bounds - the lower bound. Parameters: upper_bounds - the upper bound. a new parameter block. |
createParameterBlock | public static ParameterBlockJAI createParameterBlock(RenderedImage source, double[] lower_bounds, double[] upper_bounds)(Code) | | Creates and fills a new parameter block for the rendered mode.
Parameters: source - the source image. Parameters: lower_bounds - the lower bound. Parameters: upper_bounds - the upper bound. a new parameter block. |
createParameterBlock | public static ParameterBlockJAI createParameterBlock(RenderableImage source, double[] lower_bounds, double[] upper_bounds)(Code) | | Creates and fills a new parameter block for the renderable mode.
Parameters: source - the source image. Parameters: lower_bounds - the lower bound. Parameters: upper_bounds - the upper bound. a new parameter block. |
createRenderable | public static RenderableOp createRenderable(RenderableImage source, double[] lower_bounds, double[] upper_bounds, RenderingHints hints)(Code) | | Performs the autorescale operation on a renderable image.
Parameters: source - the image to enhance. Parameters: lower_bounds - the lower bound. Parameters: upper_bounds - the upper bound. Parameters: hints - the rendering hints, may be null . the rendered result image. |
getArg0Description | protected static String getArg0Description()(Code) | | Gets the description for the first argument, the lower bounds.
the description message. |
getArg1Description | protected static String getArg1Description()(Code) | | Gets the description for the second argument, the upper bounds.
the description message. |
getDescription | protected static String getDescription()(Code) | | Gets the description of this operation.
the description message. |
getLowerBoundGreaterThanUpperBoundErrorMessage | protected String getLowerBoundGreaterThanUpperBoundErrorMessage(double lower_bound, double upper_bound)(Code) | | Gets the error message saying a lower bound is greater than its upper bound.
Parameters: lower_bound - the lower bound. Parameters: upper_bound - the upper bound. the description message. |
getNoLowerBounds | protected String getNoLowerBounds()(Code) | | Gets the error message saying that there are no lower bounds.
the error message. |
getNoUpperBounds | protected String getNoUpperBounds()(Code) | | Gets the error message saying that there are no upper bounds.
the error message. |
getNotSameNumberOfBoundsErrorMessage | protected String getNotSameNumberOfBoundsErrorMessage(int lower_bound_len, int upper_bound_len)(Code) | | Gets the error message saying a there are not the same number of lower
bound and upper bounds.
Parameters: lower_bound_len - the lower bounds. Parameters: upper_bound_len - the upper bounds. the description message. |
validateParameters | protected boolean validateParameters(String mode, ParameterBlock pb, StringBuffer sb)(Code) | | Validates that the lower bound is smaller than or equal to the upper
bound.
Parameters: mode - the rendering mode. Parameters: pb - the parameter block. Parameters: sb - string buffer for error messages. true if all is well, false otherwise. |
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)
|
|
|