Interface ContrastEnhancement
-
- All Known Implementing Classes:
ContrastEnhancementImpl
public interface ContrastEnhancement
The ContrastEnhancement object defines contrast enhancement for a channel of a false-color image or for a color image.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.
- Since:
- GeoAPI 2.2
- Author:
- Open Geospatial Consortium, Ian Turton, CCG, Johann Sorel (Geomatys)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
accept(StyleVisitor visitor)
Traversal of the style data structure.Object
accept(TraversingStyleVisitor visitor, Object extraData)
calls the visit method of a StyleVisitorvoid
addOption(String key, Expression value)
Store a vendor optionExpression
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 string)
Map<String,Expression>
getOptions()
Return vendor options relating to the enhancement methodboolean
hasOption(String key)
check if vendor option key is availablevoid
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 aContrastEnhancementMethod
to updateMethod
andOptions
in one go.void
setOptions(Map<String,Expression> options)
-
-
-
Method Detail
-
getMethod
ContrastMethod getMethod()
We use a codeList to enable more enchancement type possibilities.
-
setMethod
void setMethod(ContrastMethod method)
Used to set the contrast enhancement method 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).- Returns:
- Expression, if
null
a value of 1.0 is assumed indicating no change
-
accept
Object accept(TraversingStyleVisitor visitor, Object extraData)
calls the visit method of a StyleVisitor- Parameters:
visitor
- the style visitor
-
getOptions
Map<String,Expression> getOptions()
Return vendor options relating to the enhancement method- Returns:
- a Map containing expressions with string keys.
-
hasOption
boolean hasOption(String key)
check if vendor option key is available- Parameters:
key
- - the name of the option to check- Returns:
- true if present
-
addOption
void addOption(String key, Expression value)
Store a vendor option- Parameters:
key
- - the name of the optionvalue
- an expression that evaluates to it's value
-
accept
void accept(StyleVisitor visitor)
Traversal of the style data structure.
-
setOptions
void setOptions(Map<String,Expression> options)
- Parameters:
options
- a Map of VendorOptions
-
getOption
Expression getOption(String string)
- Returns:
- An expression for the matching VendorOption
-
setMethod
void setMethod(ContrastMethodStrategy method)
Convenience method to allow users to pass in aContrastEnhancementMethod
to updateMethod
andOptions
in one go.- Parameters:
method
- theContrastEnhancementMethod
that underlies this enhancement
-
-