Class RendererMapColor


  • public class RendererMapColor
    extends java.lang.Object
    A helper class to map RGB color image values to an intensity value.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private float m_fScaleB
      Scale factors to apply to each RGB channel.
      private float m_fScaleG
      Scale factors to apply to each RGB channel.
      private float m_fScaleR
      Scale factors to apply to each RGB channel.
    • Constructor Summary

      Constructors 
      Constructor Description
      RendererMapColor()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()
      Disposes of image memory and associated objects.
      protected void finalize()
      Calls dispose.
      float mapValue​(float fValueR, float fValueG, float fValueB)
      Map input RGB values to an intensity value.
      void setScales​(float fScaleR, float fScaleG, float fScaleB)
      Specify the non-negative weights to apply to the RGB channels.
      • Methods inherited from class java.lang.Object

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

      • m_fScaleR

        private float m_fScaleR
        Scale factors to apply to each RGB channel. Sum of scale factors must add up to one.
      • m_fScaleG

        private float m_fScaleG
        Scale factors to apply to each RGB channel. Sum of scale factors must add up to one.
      • m_fScaleB

        private float m_fScaleB
        Scale factors to apply to each RGB channel. Sum of scale factors must add up to one.
    • Constructor Detail

      • RendererMapColor

        public RendererMapColor()
        Constructor. Defaults equal weight to each of the RGB channels.
    • Method Detail

      • dispose

        public void dispose()
        Disposes of image memory and associated objects.
      • mapValue

        public final float mapValue​(float fValueR,
                                    float fValueG,
                                    float fValueB)
        Map input RGB values to an intensity value.
        Parameters:
        fValueR - float Input red channel value.
        fValueG - float Input green channel value.
        fValueB - float Input blue channel value.
        Returns:
        float Output intensity value.
      • setScales

        public void setScales​(float fScaleR,
                              float fScaleG,
                              float fScaleB)
        Specify the non-negative weights to apply to the RGB channels. The weights will be scaled so that they add up to one.
        Parameters:
        fScaleR - float Scale factor to apply to the red channel.
        fScaleG - float Scale factor to apply to the green channel.
        fScaleB - float Scale factor to apply to the blue channel.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Calls dispose.
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable - DOCUMENT ME!