Package noaa.coastwatch.render
Class EnhancementFunctionFactory
java.lang.Object
noaa.coastwatch.render.EnhancementFunctionFactory
The
EnhancementFunctionFactory
creates enhancement
functions using a simple set of specifications. This is useful
when receiving input from the user or a file, and the input must be
used to create a function.- Since:
- 3.1.9
- Author:
- Peter Hollemans
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic EnhancementFunction
convert
(EnhancementFunction source, String functionType) Converts an enhancement function to a new function type.static EnhancementFunction
Creates a new enhancement function based on a set of specifications.
-
Constructor Details
-
EnhancementFunctionFactory
public EnhancementFunctionFactory()
-
-
Method Details
-
create
Creates a new enhancement function based on a set of specifications.- Parameters:
functionType
- the type of function desired. Supported function types are 'linear', 'log', and 'stepN' where N is the number of steps in the function, for example 'step10'. Each type may be extended with '-reverse' to indicate a reversal of the range, ie: equivalent to callingEnhancementFunction.setReverse(boolean)
after creation.range
- the function range as [min, max].- Returns:
- the new enhancement function.
- Throws:
IllegalArgumentException
- if the function type is not supported.
-
convert
Converts an enhancement function to a new function type. The new function has the same range as the source function.- Parameters:
source
- the source function to be converted.functionType
- the new function type to convert to, either 'linear', 'log', or 'stepN' where N is the step count.- Returns:
- the new converted enhancement function.
- Throws:
IllegalArgumentException
- if the function type is not supported.- See Also:
-