Class TLcdSLDContrastEnhancement

java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.sld.model.TLcdSLDContrastEnhancement
All Implemented Interfaces:
ILcdDataObject, ILcdCloneable, ILcdDeepCloneable, Cloneable

public class TLcdSLDContrastEnhancement extends TLcdDataObject
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 Details

    • NORMALIZE

      public static final String NORMALIZE
      "Normalize" contrast enhancement type. This is the default contrast enhancement type.
      See Also:
    • HISTOGRAM

      public static final String HISTOGRAM
      "Histogram" contrast enhancement type.
      See Also:
  • Constructor Details

    • TLcdSLDContrastEnhancement

      public TLcdSLDContrastEnhancement()
      Empty constructor.
    • TLcdSLDContrastEnhancement

      public TLcdSLDContrastEnhancement(String aContrastEnhancement, double aGammaCorrection)
      Constructor for given type of contrast enhancement and gamma value.
      Parameters:
      aContrastEnhancement - the type of contrast enhancement to apply.
      aGammaCorrection - the gamma value.
    • TLcdSLDContrastEnhancement

      public TLcdSLDContrastEnhancement(TLcdDataType aDataType)
      Empty constructor.
  • Method Details

    • setContrastEnhancementType

      public void setContrastEnhancementType(String aContrastEnhancementType)
      Sets the type of contrast enhancement to apply. May be null. The default value is null.
      Parameters:
      aContrastEnhancementType - NORMALIZE, HISTOGRAM or null.
      See Also:
    • getContrastEnhancementType

      public String 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

      public void setNormalize(TLcdSLDNormalize aValue)
      Sets the value of the property that maps to the Normalize element.
      Parameters:
      aValue - the value to set for the NORMALIZE_PROPERTY property.
    • setHistogram

      public void setHistogram(TLcdSLDHistogram aValue)
      Sets the value of the property that maps to the Histogram element.
      Parameters:
      aValue - the value to set for the HISTOGRAM_PROPERTY property.
    • acceptContrastEnhancementType

      protected boolean acceptContrastEnhancementType(String aContrastEnhancementType)
      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

      public TLcdSLDNormalize getNormalize()
      Returns the value of the property that maps to the Normalize element.
      Returns:
      the value of the NORMALIZE_PROPERTY property.
    • getHistogram

      public TLcdSLDHistogram getHistogram()
      Returns the value of the property that maps to the Histogram element.
      Returns:
      the value of the HISTOGRAM_PROPERTY property.
    • getGammaValue

      public double getGammaValue()
      Returns the value of the property that maps to the GammaValue 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 the GammaValue 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 the GAMMA_VALUE_PROPERTY property.