Class GammaImageProcessor
- java.lang.Object
-
- org.openstreetmap.josm.gui.layer.imagery.GammaImageProcessor
-
- All Implemented Interfaces:
SessionAwareReadApply,ImageProcessor
public class GammaImageProcessor extends java.lang.Object implements ImageProcessor, SessionAwareReadApply
An image processor which adjusts the gamma value of an image.- Since:
- 10547
-
-
Field Summary
Fields Modifier and Type Field Description private doublegamma(package private) short[]gammaChangeprivate java.awt.image.LookupOpop3private java.awt.image.LookupOpop4
-
Constructor Summary
Constructors Constructor Description GammaImageProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyFromPropertiesMap(java.util.Map<java.lang.String,java.lang.String> properties)Import settings from a map of properties.doublegetGamma()Returns the currently set gamma value.java.awt.image.BufferedImageprocess(java.awt.image.BufferedImage image)This method should process given image according to image processors which is contained in the layervoidsetGamma(double gamma)Sets a new gamma value,1stands for no correction.java.util.Map<java.lang.String,java.lang.String>toPropertiesMap()Export settings to a map of properties.java.lang.StringtoString()
-
-
-
Field Detail
-
gamma
private double gamma
-
gammaChange
final short[] gammaChange
-
op3
private final java.awt.image.LookupOp op3
-
op4
private final java.awt.image.LookupOp op4
-
-
Constructor Detail
-
GammaImageProcessor
public GammaImageProcessor()
-
-
Method Detail
-
getGamma
public double getGamma()
Returns the currently set gamma value.- Returns:
- the currently set gamma value
-
setGamma
public void setGamma(double gamma)
Sets a new gamma value,1stands for no correction.- Parameters:
gamma- new gamma value
-
process
public java.awt.image.BufferedImage process(java.awt.image.BufferedImage image)
Description copied from interface:ImageProcessorThis method should process given image according to image processors which is contained in the layer- Specified by:
processin interfaceImageProcessor- Parameters:
image- that should be processed- Returns:
- processed image
-
applyFromPropertiesMap
public void applyFromPropertiesMap(java.util.Map<java.lang.String,java.lang.String> properties)
Description copied from interface:SessionAwareReadApplyImport settings from a map of properties.- Specified by:
applyFromPropertiesMapin interfaceSessionAwareReadApply- Parameters:
properties- properties map
-
toPropertiesMap
public java.util.Map<java.lang.String,java.lang.String> toPropertiesMap()
Description copied from interface:SessionAwareReadApplyExport settings to a map of properties.- Specified by:
toPropertiesMapin interfaceSessionAwareReadApply- Returns:
- map of properties
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-