Class LogColorMapper
java.lang.Object
org.biojava.nbio.structure.gui.util.color.ContinuousColorMapperTransform
org.biojava.nbio.structure.gui.util.color.LogColorMapper
- All Implemented Interfaces:
ContinuousColorMapper
Performs a log10 transform on input before passing the values off to another
colorMapper.
For instance, to map [10^0, 10^10] to a rainbow gradient, use
new LogColorMapper(GradientMapper.getGradientMapper(GradientMapper.RAINBOW_GRADIENT, 0, 10))
- Author:
- Spencer Bliven
-
Field Summary
Fields inherited from class org.biojava.nbio.structure.gui.util.color.ContinuousColorMapperTransform
mapper -
Constructor Summary
ConstructorsConstructorDescriptionLogColorMapper(ContinuousColorMapper logspaceMapper) Creates a new LogColorMapper with base 10.LogColorMapper(ContinuousColorMapper logspaceMapper, int base) If logspaceMapper maps values x1 to x2, this creates a mapper for values base^x1 to base^x2 -
Method Summary
Methods inherited from class org.biojava.nbio.structure.gui.util.color.ContinuousColorMapperTransform
getColor
-
Constructor Details
-
LogColorMapper
Creates a new LogColorMapper with base 10.- Parameters:
logspaceMapper-
-
LogColorMapper
If logspaceMapper maps values x1 to x2, this creates a mapper for values base^x1 to base^x2- Parameters:
logspaceMapper- logspace mapperbase- The base of the logorithm
-
-
Method Details
-
transform
public double transform(double value) Apply log transform.- Specified by:
transformin classContinuousColorMapperTransform- Parameters:
value-- Returns:
- log_b(value)
- See Also:
-