Package noaa.coastwatch.render
Class StepEnhancement
java.lang.Object
noaa.coastwatch.util.Function
noaa.coastwatch.render.EnhancementFunction
noaa.coastwatch.render.LinearEnhancement
noaa.coastwatch.render.StepEnhancement
- All Implemented Interfaces:
Serializable
,Cloneable
,Encodable
A step enhancement is an enhancement function formed by a number of
discrete steps.
- Since:
- 3.1.1
- Author:
- Peter Hollemans
- See Also:
-
Field Summary
Fields inherited from class noaa.coastwatch.render.EnhancementFunction
range, reverse
-
Constructor Summary
ConstructorDescriptionStepEnhancement
(double[] range, double step) Constructs a step enhancement from the specified parameters.StepEnhancement
(double[] range, int steps) Constructs a step enhancement from the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()
Gets a description of the function.boolean
Indicates whether some other object is "equal to" this one.double
evaluate
(double[] variables) Evaluates the enhancement at the specified data value.int
getSteps()
Gets the number of steps in the enhancement.Methods inherited from class noaa.coastwatch.render.LinearEnhancement
getInverse, reset
Methods inherited from class noaa.coastwatch.render.EnhancementFunction
clone, getRange, getReverse, getValue, normalize, setRange, setReverse
Methods inherited from class noaa.coastwatch.util.Function
getEncoding, useEncoding
-
Constructor Details
-
StepEnhancement
public StepEnhancement(double[] range, double step) Constructs a step enhancement from the specified parameters. The minimum and maximum data values are mapped to [0..1].- Parameters:
range
- the enhancement range as [min, max].step
- the data value step size. The range between the minimum and maximum is divided up into discrete steps of this size.
-
StepEnhancement
public StepEnhancement(double[] range, int steps) Constructs a step enhancement from the specified parameters. The minimum and maximum data values are mapped to the range [0..1].- Parameters:
range
- the enhancement range as [min, max].steps
- the number of data steps in the range.
-
-
Method Details
-
evaluate
public double evaluate(double[] variables) Description copied from class:LinearEnhancement
Evaluates the enhancement at the specified data value. TheEnhancementFunction.getValue(double)
method should be used instead of this method for evaluating enhancement values.- Overrides:
evaluate
in classLinearEnhancement
- Parameters:
variables
- a double[1] specifying the data value.- Returns:
- the enhancement value.
-
getSteps
public int getSteps()Gets the number of steps in the enhancement. -
equals
Indicates whether some other object is "equal to" this one.- Overrides:
equals
in classEnhancementFunction
-
describe
Description copied from class:EnhancementFunction
Gets a description of the function.- Overrides:
describe
in classLinearEnhancement
-