Package noaa.coastwatch.render
Class LinearEnhancement
java.lang.Object
noaa.coastwatch.util.Function
noaa.coastwatch.render.EnhancementFunction
noaa.coastwatch.render.LinearEnhancement
- All Implemented Interfaces:
Serializable
,Cloneable
,Encodable
- Direct Known Subclasses:
StepEnhancement
A linear enhancement is an enhancement function formed by a linear
y = mx + b relationship.
- Since:
- 3.1.1
- Author:
- Peter Hollemans
- See Also:
-
Field Summary
Fields inherited from class noaa.coastwatch.render.EnhancementFunction
range, reverse
-
Constructor Summary
ConstructorDescriptionLinearEnhancement
(double[] range) Constructs a linear enhancement from the data value range. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()
Gets a description of the function.double
evaluate
(double[] variables) Evaluates the enhancement at the specified data value.double
getInverse
(double normValue) Gets the inverse enhancement value.protected void
reset()
Resets the enhancement function.Methods inherited from class noaa.coastwatch.render.EnhancementFunction
clone, equals, getRange, getReverse, getValue, normalize, setRange, setReverse
Methods inherited from class noaa.coastwatch.util.Function
getEncoding, useEncoding
-
Constructor Details
-
LinearEnhancement
public LinearEnhancement(double[] range) Constructs a linear enhancement from the data value range. The minimum and maximum data values are mapped to [0..1].- Parameters:
range
- the enhancement range as [min, max].
-
-
Method Details
-
getInverse
public double getInverse(double normValue) Description copied from class:EnhancementFunction
Gets the inverse enhancement value.- Specified by:
getInverse
in classEnhancementFunction
- Parameters:
normValue
- the normalized data value.- Returns:
- the unnormalized data value.
-
evaluate
public double evaluate(double[] variables) Evaluates the enhancement at the specified data value. TheEnhancementFunction.getValue(double)
method should be used instead of this method for evaluating enhancement values. -
reset
protected void reset()Resets the enhancement function.- Overrides:
reset
in classEnhancementFunction
-
describe
Description copied from class:EnhancementFunction
Gets a description of the function.- Specified by:
describe
in classEnhancementFunction
-