Package com.luciad.ogc.sld.model
Class TLcdSLDContrastEnhancement
java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.sld.model.TLcdSLDContrastEnhancement
- All Implemented Interfaces:
ILcdDataObject
,ILcdCloneable
,ILcdDeepCloneable
,Cloneable
The ContrastEnhancement element 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.-
Field Summary
-
Constructor Summary
ConstructorDescriptionEmpty constructor.TLcdSLDContrastEnhancement
(TLcdDataType aDataType) Empty constructor.TLcdSLDContrastEnhancement
(String aContrastEnhancement, double aGammaCorrection) Constructor for given type of contrast enhancement and gamma value. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
acceptContrastEnhancementType
(String aContrastEnhancementType) Checks which contrast enhancement types are acceptable.double
Returns the value of the property that maps to theGammaValue
element.Returns the value of the property that maps to theHistogram
element.Returns the value of the property that maps to theNormalize
element.void
setContrastEnhancementType
(String aContrastEnhancementType) Sets the type of contrast enhancement to apply.void
setGammaValue
(double aValue) Sets the value of the property that maps to theGammaValue
element.void
setHistogram
(TLcdSLDHistogram aValue) Sets the value of the property that maps to theHistogram
element.void
setNormalize
(TLcdSLDNormalize aValue) Sets the value of the property that maps to theNormalize
element.
-
Field Details
-
NORMALIZE
"Normalize" contrast enhancement type. This is the default contrast enhancement type.- See Also:
-
HISTOGRAM
"Histogram" contrast enhancement type.- See Also:
-
-
Constructor Details
-
TLcdSLDContrastEnhancement
public TLcdSLDContrastEnhancement()Empty constructor. -
TLcdSLDContrastEnhancement
Constructor for given type of contrast enhancement and gamma value.- Parameters:
aContrastEnhancement
- the type of contrast enhancement to apply.aGammaCorrection
- the gamma value.
-
TLcdSLDContrastEnhancement
Empty constructor.
-
-
Method Details
-
setContrastEnhancementType
Sets the type of contrast enhancement to apply. May benull
. The default value isnull
. -
getContrastEnhancementType
Returns the type of contrast enhancement that is being applied:NORMALIZE
,HISTOGRAM
or none (null
). By default,null
is returned.- Returns:
- the type of contrast enhancement that is being applied
- Since:
- 2018.1
-
setNormalize
Sets the value of the property that maps to theNormalize
element.- Parameters:
aValue
- the value to set for theNORMALIZE_PROPERTY
property.
-
setHistogram
Sets the value of the property that maps to theHistogram
element.- Parameters:
aValue
- the value to set for theHISTOGRAM_PROPERTY
property.
-
acceptContrastEnhancementType
Checks which contrast enhancement types are acceptable.- Parameters:
aContrastEnhancementType
- the contrast enhancement type to apply.- Returns:
- true if the contrast enhancement type is
HISTOGRAM, NORMALIZE or
null
.
-
getNormalize
Returns the value of the property that maps to theNormalize
element.- Returns:
- the value of the
NORMALIZE_PROPERTY
property.
-
getHistogram
Returns the value of the property that maps to theHistogram
element.- Returns:
- the value of the
HISTOGRAM_PROPERTY
property.
-
getGammaValue
public double getGammaValue()Returns the value of the property that maps to theGammaValue
element.A gamma correction tells how much to brighten (value greater than 1.0) or dim (value less than 1.0) an image. The default gamma value is 1.0 (no change).
- Returns:
- the value of the
GAMMA_VALUE_PROPERTY
property.
-
setGammaValue
public void setGammaValue(double aValue) Sets the value of the property that maps to theGammaValue
element.A gamma correction tells how much to brighten (value greater than 1.0) or dim (value less than 1.0) an image. The default gamma value is 1.0 (no change).
- Parameters:
aValue
- the value to set for theGAMMA_VALUE_PROPERTY
property.
-