Class ContrastMethod

  • All Implemented Interfaces:
    Serializable, Comparable<ContrastMethod>, ControlledVocabulary

    @XmlElement("ContrastEnchancement:type")
    public final class ContrastMethod
    extends CodeList<ContrastMethod>
    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.
    Since:
    GeoAPI 2.2
    See Also:
    Serialized Form
    • Field Detail

      • NORMALIZE

        @XmlElement("Normalize")
        public static final ContrastMethod NORMALIZE
        Normalize enchancement. “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

        @XmlElement("Histogram")
        public static final ContrastMethod HISTOGRAM
        Histogram enchancement. “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.
      • NONE

        public static final ContrastMethod NONE
        No enchancement. this is the default value.
    • Method Detail

      • values

        public static ContrastMethod[] values()
        Returns the list of ContrastTypes.
        Returns:
        the list of codes declared in the current JVM.
      • family

        public ContrastMethod[] family()
        Returns the list of codes of the same kind than this code list element. Invoking this method is equivalent to invoking values(), except that this method can be invoked on an instance of the parent CodeList class.
        Specified by:
        family in interface ControlledVocabulary
        Specified by:
        family in class CodeList<ContrastMethod>
        Returns:
        all code values for this code list.
      • valueOf

        public static ContrastMethod valueOf​(String code)
        Returns the contrast type that matches the given string, or returns a new one if none match it. More specifically, this methods returns the first instance for which name().equals(code) returns true. If no existing instance is found, then a new one is created for the given name.
        Parameters:
        code - the name of the code to fetch or to create.
        Returns:
        a code matching the given name.