org.geotools.styling
Class ContrastEnhancementImpl

java.lang.Object
  extended byorg.geotools.event.AbstractGTComponent
      extended byorg.geotools.styling.ContrastEnhancementImpl
All Implemented Interfaces:
ContrastEnhancement, GTComponent

public class ContrastEnhancementImpl
extends AbstractGTComponent
implements ContrastEnhancement

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.

Author:
iant

Field Summary
 
Fields inherited from class org.geotools.event.AbstractGTComponent
notification
 
Constructor Summary
ContrastEnhancementImpl()
           
ContrastEnhancementImpl(FilterFactory factory)
           
 
Method Summary
 Expression getGammaValue()
           
 Expression getType()
           
 void setFilterFactory(FilterFactory factory)
           
 void setGammaValue(Expression gamma)
           
 void setHistogram()
           
 void setNormalize()
           
 void setType(Expression type)
           
 
Methods inherited from class org.geotools.event.AbstractGTComponent
changed, clone, fireChanged, fireChildChanged, getNote, getParent, removed, setNote
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.event.GTComponent
changed, getNote, getParent, removed, setNote
 

Constructor Detail

ContrastEnhancementImpl

public ContrastEnhancementImpl()

ContrastEnhancementImpl

public ContrastEnhancementImpl(FilterFactory factory)
Method Detail

setFilterFactory

public void setFilterFactory(FilterFactory factory)

getGammaValue

public Expression getGammaValue()
Specified by:
getGammaValue in interface ContrastEnhancement

getType

public Expression getType()
Specified by:
getType in interface ContrastEnhancement

setGammaValue

public void setGammaValue(Expression gamma)
Specified by:
setGammaValue in interface ContrastEnhancement

setHistogram

public void setHistogram()
Specified by:
setHistogram in interface ContrastEnhancement

setNormalize

public void setNormalize()
Specified by:
setNormalize in interface ContrastEnhancement

setType

public void setType(Expression type)
Specified by:
setType in interface ContrastEnhancement


Copyright © GeoTools. All Rights Reserved.