Package noaa.coastwatch.render
Class LogEnhancement
java.lang.Object
noaa.coastwatch.util.Function
noaa.coastwatch.render.EnhancementFunction
noaa.coastwatch.render.LogEnhancement
- All Implemented Interfaces:
Serializable,Cloneable,Encodable
A log enhancement is an enhancement function formed by a logarithm
y = mlogx + 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
ConstructorsConstructorDescriptionLogEnhancement(double[] range) Constructs a log enhancement from the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()Gets a description of the function.doubleevaluate(double[] variables) Evaluates the enhancement at the specified data value.doublegetInverse(double normValue) Gets the inverse enhancement value.static doublelog10(double x) Computes the log base 10 of a number.protected voidreset()Resets the enhancement function.voidsetRange(double[] range) Sets the enhancement range.Methods inherited from class noaa.coastwatch.render.EnhancementFunction
clone, equals, getRange, getReverse, getValue, normalize, setReverseMethods inherited from class noaa.coastwatch.util.Function
getEncoding, useEncoding
-
Constructor Details
-
LogEnhancement
public LogEnhancement(double[] range) Constructs a log enhancement from the specified parameters. The minimum and maximum data values are mapped to [0..1].- Parameters:
range- the enhancement range as [min, max].
-
-
Method Details
-
log10
public static double log10(double x) Computes the log base 10 of a number. -
setRange
public void setRange(double[] range) Description copied from class:EnhancementFunctionSets the enhancement range.- Overrides:
setRangein classEnhancementFunction- Parameters:
range- the enhancement range as [min, max].
-
getInverse
public double getInverse(double normValue) Description copied from class:EnhancementFunctionGets the inverse enhancement value.- Specified by:
getInversein 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:
resetin classEnhancementFunction
-
describe
Description copied from class:EnhancementFunctionGets a description of the function.- Specified by:
describein classEnhancementFunction
-