01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.styling;
17:
18: import org.opengis.filter.expression.Expression;
19: import org.geotools.event.GTComponent;
20:
21: /**
22: * The ContrastEnhancement object defines contrast enhancement for a channel of
23: * a false-color image or for a color image. Its format is:
24: * <pre>
25: * <xs:element name="ContrastEnhancement">
26: * <xs:complexType>
27: * <xs:sequence>
28: * <xs:choice minOccurs="0">
29: * <xs:element ref="sld:Normalize"/>
30: * <xs:element ref="sld:Histogram"/>
31: * </xs:choice>
32: * <xs:element ref="sld:GammaValue" minOccurs="0"/>
33: * </xs:sequence>
34: * </xs:complexType>
35: * </xs:element>
36: * <xs:element name="Normalize">
37: * <xs:complexType/>
38: * </xs:element>
39: * <xs:element name="Histogram">
40: * <xs:complexType/>
41: * </xs:element>
42: * <xs:element name="GammaValue" type="xs:double"/>
43: * </pre>
44: * In the case of a color image, the relative grayscale brightness of a pixel
45: * color is used. ?Normalize? means to stretch the contrast so that the
46: * dimmest color is stretched to black and the brightest color is stretched to
47: * white, with all colors in between stretched out linearly. ?Histogram? means
48: * to stretch the contrast based on a histogram of how many colors are at each
49: * brightness level on input, with the goal of producing equal number of
50: * pixels in the image at each brightness level on output. This has the
51: * effect of revealing many subtle ground features. A ?GammaValue? tells how
52: * much to brighten (value greater than 1.0) or dim (value less than 1.0) an
53: * image. The default GammaValue is 1.0 (no change). If none of Normalize,
54: * Histogram, or GammaValue are selected in a ContrastEnhancement, then no
55: * enhancement is performed.
56: *
57: * @author iant
58: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/styling/ContrastEnhancement.java $
59: */
60: public interface ContrastEnhancement extends GTComponent {
61: public void setType(Expression type);
62:
63: public Expression getType();
64:
65: public void setGammaValue(Expression gamma);
66:
67: public Expression getGammaValue();
68:
69: public void setNormalize();
70:
71: public void setHistogram();
72: }
|