public class ContrastEnhancementImpl extends Object implements ContrastEnhancement
<xs:element name="ContrastEnhancement">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0">
<xs:element ref="sld:Normalize"/>
<xs:element ref="sld:Histogram"/>
</xs:choice>
<xs:element ref="sld:GammaValue" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Normalize">
<xs:complexType/>
</xs:element>
<xs:element name="Histogram">
<xs:complexType/>
</xs:element>
<xs:element name="GammaValue" type="xs:double"/>
In the case of a color image, the relative grayscale brightness of a pixel color is used.
?Normalize? means to stretch the contrast so that the dimmest color is stretched to black and the
brightest color is stretched to white, with all colors in between stretched out linearly.
?Histogram? means to stretch the contrast based on a histogram of how many colors are at each
brightness level on input, with the goal of producing equal number of pixels in the image at each
brightness level on output. This has the effect of revealing many subtle ground features. A
?GammaValue? tells how much to brighten (value greater than 1.0) or dim (value less than 1.0) an
image. The default GammaValue is 1.0 (no change). If none of Normalize, Histogram, or GammaValue
are selected in a ContrastEnhancement, then no enhancement is performed.| Constructor and Description |
|---|
ContrastEnhancementImpl() |
ContrastEnhancementImpl(ContrastEnhancement contrastEnhancement) |
ContrastEnhancementImpl(FilterFactory factory) |
ContrastEnhancementImpl(FilterFactory2 factory,
Expression gamma,
ContrastMethod method) |
ContrastEnhancementImpl(FilterFactory factory,
ContrastMethod method) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(StyleVisitor visitor)
Traversal of the style data structure.
|
Object |
accept(StyleVisitor visitor,
Object extraData)
calls the visit method of a StyleVisitor
|
void |
addOption(String key,
Expression value)
Store a vendor option
|
boolean |
equals(Object obj) |
Expression |
getGammaValue()
How much to brighten (values greater than 1.0) or dim (values less than 1.0) an image.
|
ContrastMethod |
getMethod()
We use a codeList to enable more enchancement type possibilities.
|
Expression |
getOption(String key) |
Map<String,Expression> |
getOptions()
Return vendor options relating to the enhancement method
|
int |
hashCode() |
boolean |
hasOption(String key)
check if vendor option key is available
|
void |
setFilterFactory(FilterFactory factory) |
void |
setGammaValue(Expression gamma) |
void |
setMethod(ContrastMethod method)
Used to set the contrast enhancement method used.
|
void |
setMethod(ContrastMethodStrategy method)
Convenience method to allow users to pass in a
ContrastEnhancementMethod to update
Method and Options in one go. |
void |
setOptions(Map<String,Expression> options) |
public ContrastEnhancementImpl()
public ContrastEnhancementImpl(FilterFactory factory)
public ContrastEnhancementImpl(FilterFactory factory, ContrastMethod method)
public ContrastEnhancementImpl(ContrastEnhancement contrastEnhancement)
public ContrastEnhancementImpl(FilterFactory2 factory, Expression gamma, ContrastMethod method)
public void setFilterFactory(FilterFactory factory)
public Expression getGammaValue()
ContrastEnhancementgetGammaValue in interface ContrastEnhancementnull a value of 1.0 is assumed indicating no changepublic void setGammaValue(Expression gamma)
gamma - How much to brighten (greater than 1) or dim (less than 1) this channel; use 1.0
to indicate no change.public ContrastMethod getMethod()
ContrastEnhancementgetMethod in interface ContrastEnhancementpublic Object accept(StyleVisitor visitor, Object extraData)
ContrastEnhancementaccept in interface ContrastEnhancementvisitor - the style visitorpublic void accept(StyleVisitor visitor)
ContrastEnhancementpublic void setMethod(ContrastMethod method)
ContrastEnhancementpublic Map<String,Expression> getOptions()
ContrastEnhancementpublic boolean hasOption(String key)
ContrastEnhancementkey - - the name of the option to checkpublic Expression getOption(String key)
public void addOption(String key, Expression value)
ContrastEnhancementkey - - the name of the optionvalue - an expression that evaluates to it's valuepublic void setOptions(Map<String,Expression> options)
options - a Map of VendorOptionspublic void setMethod(ContrastMethodStrategy method)
ContrastEnhancementContrastEnhancementMethod to update
Method and Options in one go.method - the ContrastEnhancementMethod that underlies this enhancementCopyright © 1996–2019 Geotools. All rights reserved.