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
public class LogColorMapper extends ContinuousColorMapperTransform
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
Constructors Constructor Description LogColorMapper(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
transform(double value)
Apply log transform.-
Methods inherited from class org.biojava.nbio.structure.gui.util.color.ContinuousColorMapperTransform
getColor
-
-
-
-
Constructor Detail
-
LogColorMapper
public LogColorMapper(ContinuousColorMapper logspaceMapper)
Creates a new LogColorMapper with base 10.- Parameters:
logspaceMapper
-
-
LogColorMapper
public LogColorMapper(ContinuousColorMapper logspaceMapper, int base)
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 Detail
-
transform
public double transform(double value)
Apply log transform.- Specified by:
transform
in classContinuousColorMapperTransform
- Parameters:
value
-- Returns:
- log_b(value)
- See Also:
ContinuousColorMapperTransform.transform(double)
-
-