|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.styling.ContrastEnhancementImpl
public class ContrastEnhancementImpl
The ContrastEnhancement object defines contrast enhancement for a channel of a false-color image or for a color image. Its format is:
<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 Summary | |
---|---|
ContrastEnhancementImpl()
|
|
ContrastEnhancementImpl(org.opengis.style.ContrastEnhancement contrastEnhancement)
|
|
ContrastEnhancementImpl(org.opengis.filter.FilterFactory factory)
|
|
ContrastEnhancementImpl(org.opengis.filter.FilterFactory2 factory,
org.opengis.filter.expression.Expression gamma,
org.opengis.style.ContrastMethod method)
|
|
ContrastEnhancementImpl(org.opengis.filter.FilterFactory factory,
org.opengis.style.ContrastMethod method)
|
Method Summary | |
---|---|
void |
accept(StyleVisitor visitor)
Traversal of the style data structure. |
java.lang.Object |
accept(org.opengis.style.StyleVisitor visitor,
java.lang.Object extraData)
|
boolean |
equals(java.lang.Object obj)
|
org.opengis.filter.expression.Expression |
getGammaValue()
How much to brighten (values greater than 1.0) or dim (values less than 1.0) an image. |
org.opengis.style.ContrastMethod |
getMethod()
|
org.opengis.filter.expression.Expression |
getType()
Returns a literal expression (one of NORMALIZE, HISTOGRAM, NONE) indicating which ContrastMethod value is to be used. |
int |
hashCode()
|
void |
setExponential()
|
void |
setFilterFactory(org.opengis.filter.FilterFactory factory)
|
void |
setGammaValue(org.opengis.filter.expression.Expression gamma)
|
void |
setHistogram()
|
void |
setLogarithmic()
|
void |
setMethod(org.opengis.style.ContrastMethod method)
Used to set the contrast enhancement method used. |
void |
setNormalize()
|
void |
setType(org.opengis.filter.expression.Expression type)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContrastEnhancementImpl()
public ContrastEnhancementImpl(org.opengis.filter.FilterFactory factory)
public ContrastEnhancementImpl(org.opengis.filter.FilterFactory factory, org.opengis.style.ContrastMethod method)
public ContrastEnhancementImpl(org.opengis.style.ContrastEnhancement contrastEnhancement)
public ContrastEnhancementImpl(org.opengis.filter.FilterFactory2 factory, org.opengis.filter.expression.Expression gamma, org.opengis.style.ContrastMethod method)
Method Detail |
---|
public void setFilterFactory(org.opengis.filter.FilterFactory factory)
public org.opengis.filter.expression.Expression getGammaValue()
ContrastEnhancement
getGammaValue
in interface org.opengis.style.ContrastEnhancement
null
a value of 1.0 is assumed indicating no changepublic org.opengis.filter.expression.Expression getType()
ContrastEnhancement
public void setGammaValue(org.opengis.filter.expression.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 void setHistogram()
public void setNormalize()
public void setLogarithmic()
public void setExponential()
public void setType(org.opengis.filter.expression.Expression type)
type
- Should be a Literal of "Normalize" or "Histogram" or "None", if null supplied "None" is assumedpublic void setMethod(org.opengis.style.ContrastMethod method)
ContrastEnhancement
public org.opengis.style.ContrastMethod getMethod()
getMethod
in interface org.opengis.style.ContrastEnhancement
public java.lang.Object accept(org.opengis.style.StyleVisitor visitor, java.lang.Object extraData)
accept
in interface org.opengis.style.ContrastEnhancement
public void accept(StyleVisitor visitor)
ContrastEnhancement
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |