org.geotools.styling
Interface ContrastEnhancement

All Superinterfaces:
ContrastEnhancement

public interface ContrastEnhancement
extends 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
Module:
modules/library/api (gt-api.jar)

Method Summary
 void accept(StyleVisitor visitor)
          Traversal of the style data structure.
 Expression getGammaValue()
          How much to brighten (values greater than 1.0) or dim (values less than 1.0) an image.
 Expression getType()
          Deprecated. Please use getMethod
 void setExponential()
          Deprecated. Please use setMethod; please note Exponential is not currently supported
 void setGammaValue(Expression gamma)
           
 void setHistogram()
          Deprecated. Please use setMethod( ContrastMethodt.HISTOGRAM )
 void setLogarithmic()
          Deprecated. Please use setMethod; please note Logarithmic is not currently supported
 void setMethod(ContrastMethod method)
          Used to set the contrast enhancement method used.
 void setNormalize()
          Deprecated. Please use setMethod( ContrastMethodt.NORMALIZE )
 void setType(Expression type)
          Deprecated. Please use setMethod
 
Methods inherited from interface ContrastEnhancement
accept, getMethod
 

Method Detail

setMethod

void setMethod(ContrastMethod method)
Used to set the contrast enhancement method used.

Parameters:
method -

setType

void setType(Expression type)
Deprecated. Please use setMethod

Parameters:
type - Should be a Literal of "Normalize" or "Histogram" or "None", if null supplied "None" is assumed

getType

Expression getType()
Deprecated. Please use getMethod

Returns a literal expression (one of NORMALIZE, HISTOGRAM, NONE) indicating which ContrastMethod value is to be used.


setGammaValue

void setGammaValue(Expression gamma)
Parameters:
gamma - How much to brighten (greater than 1) or dim (less than 1) this channel; use 1.0 to indicate no change.

getGammaValue

Expression getGammaValue()
How much to brighten (values greater than 1.0) or dim (values less than 1.0) an image. The default GammaValue is 1.0 (no change).

Specified by:
getGammaValue in interface ContrastEnhancement
Returns:
Expression, if null a value of 1.0 is assumed indicating no change

setNormalize

@Deprecated
void setNormalize()
Deprecated. Please use setMethod( ContrastMethodt.NORMALIZE )


setHistogram

@Deprecated
void setHistogram()
Deprecated. Please use setMethod( ContrastMethodt.HISTOGRAM )


setLogarithmic

@Deprecated
void setLogarithmic()
Deprecated. Please use setMethod; please note Logarithmic is not currently supported


setExponential

void setExponential()
Deprecated. Please use setMethod; please note Exponential is not currently supported


accept

void accept(StyleVisitor visitor)
Traversal of the style data structure.

Parameters:
visitor -


Copyright © 1996-2009 Geotools. All Rights Reserved.