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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty 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 booleanacceptContrastEnhancementType(String aContrastEnhancementType) Checks which contrast enhancement types are acceptable.doubleReturns the value of the property that maps to theGammaValueelement.Returns the value of the property that maps to theHistogramelement.Returns the value of the property that maps to theNormalizeelement.voidsetContrastEnhancementType(String aContrastEnhancementType) Sets the type of contrast enhancement to apply.voidsetGammaValue(double aValue) Sets the value of the property that maps to theGammaValueelement.voidsetHistogram(TLcdSLDHistogram aValue) Sets the value of the property that maps to theHistogramelement.voidsetNormalize(TLcdSLDNormalize aValue) Sets the value of the property that maps to theNormalizeelement.
-
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,HISTOGRAMor none (null). By default,nullis returned.- Returns:
- the type of contrast enhancement that is being applied
- Since:
- 2018.1
-
setNormalize
Sets the value of the property that maps to theNormalizeelement.- Parameters:
aValue- the value to set for theNORMALIZE_PROPERTYproperty.
-
setHistogram
Sets the value of the property that maps to theHistogramelement.- Parameters:
aValue- the value to set for theHISTOGRAM_PROPERTYproperty.
-
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 theNormalizeelement.- Returns:
- the value of the
NORMALIZE_PROPERTYproperty.
-
getHistogram
Returns the value of the property that maps to theHistogramelement.- Returns:
- the value of the
HISTOGRAM_PROPERTYproperty.
-
getGammaValue
public double getGammaValue()Returns the value of the property that maps to theGammaValueelement.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_PROPERTYproperty.
-
setGammaValue
public void setGammaValue(double aValue) Sets the value of the property that maps to theGammaValueelement.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_PROPERTYproperty.
-