Class ToneMapper.Generic

  • Enclosing class:
    ToneMapper

    public static class ToneMapper.Generic
    extends ToneMapper
    Generic tone mapping operator that gives control over the tone mapping curve. This operator can be used to control the aesthetics of the final image. This operator also allows to control the dynamic range of the scene referred values. The tone mapping curve is defined by 5 parameters:
    • contrast: controls the contrast of the curve
    • referred values map to output white
    • midGrayIn: sets the input middle gray
    • midGrayOut: sets the output middle gray
    • hdrMax: defines the maximum input value that will be mapped to output white
    • Constructor Summary

      Constructors 
      Constructor Description
      Generic()
      Builds a new generic tone mapper parameterized to closely approximate the ToneMapper.ACESLegacy tone mapper.
      Generic​(float contrast, float midGrayIn, float midGrayOut, float hdrMax)
      Builds a new generic tone mapper.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float getContrast()
      Returns the contrast of the curve as a strictly positive value.
      float getHdrMax()
      Returns the maximum input value that will map to output white, as a value >= 1.0.
      float getMidGrayIn()
      Returns the middle gray point for input values as a value between 0.0 and 1.0.
      float getMidGrayOut()
      Returns the middle gray point for output values as a value between 0.0 and 1.0.
      void setContrast​(float contrast)
      Sets the contrast of the curve, must be > 0.0, values in the range 0.5..2.0 are recommended.
      void setHdrMax​(float hdrMax)
      Defines the maximum input value that will be mapped to output white.
      void setMidGrayIn​(float midGrayIn)
      Sets the input middle gray, between 0.0 and 1.0.
      void setMidGrayOut​(float midGrayOut)
      Sets the output middle gray, between 0.0 and 1.0.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Generic

        public Generic()
        Builds a new generic tone mapper parameterized to closely approximate the ToneMapper.ACESLegacy tone mapper. The default values are:
        • contrast = 1.55f
        • midGrayIn = 0.18f
        • midGrayOut = 0.215f
        • hdrMax = 10.0f
      • Generic

        public Generic​(float contrast,
                       float midGrayIn,
                       float midGrayOut,
                       float hdrMax)
        Builds a new generic tone mapper.
        Parameters:
        contrast - : controls the contrast of the curve, must be > 0.0, values in the range 0.5..2.0 are recommended.
        midGrayIn - : sets the input middle gray, between 0.0 and 1.0.
        midGrayOut - : sets the output middle gray, between 0.0 and 1.0.
        hdrMax - : defines the maximum input value that will be mapped to output white. Must be >= 1.0.
    • Method Detail

      • getContrast

        public float getContrast()
        Returns the contrast of the curve as a strictly positive value.
      • setContrast

        public void setContrast​(float contrast)
        Sets the contrast of the curve, must be > 0.0, values in the range 0.5..2.0 are recommended.
      • getMidGrayIn

        public float getMidGrayIn()
        Returns the middle gray point for input values as a value between 0.0 and 1.0.
      • setMidGrayIn

        public void setMidGrayIn​(float midGrayIn)
        Sets the input middle gray, between 0.0 and 1.0.
      • getMidGrayOut

        public float getMidGrayOut()
        Returns the middle gray point for output values as a value between 0.0 and 1.0.
      • setMidGrayOut

        public void setMidGrayOut​(float midGrayOut)
        Sets the output middle gray, between 0.0 and 1.0.
      • getHdrMax

        public float getHdrMax()
        Returns the maximum input value that will map to output white, as a value >= 1.0.
      • setHdrMax

        public void setHdrMax​(float hdrMax)
        Defines the maximum input value that will be mapped to output white. Must be >= 1.0.