com.jhlabs.image
Class GammaFilter

java.lang.Object
  extended by com.jhlabs.image.AbstractBufferedImageOp
      extended by com.jhlabs.image.PointFilter
          extended by com.jhlabs.image.TransferFilter
              extended by com.jhlabs.image.GammaFilter
All Implemented Interfaces:
java.awt.image.BufferedImageOp, java.lang.Cloneable

public class GammaFilter
extends TransferFilter

A filter for changing the gamma of an image.


Field Summary
 
Fields inherited from class com.jhlabs.image.TransferFilter
bTable, gTable, initialized, rTable
 
Fields inherited from class com.jhlabs.image.PointFilter
canFilterIndexColorModel
 
Constructor Summary
GammaFilter()
          Construct a GammaFilter.
GammaFilter(float gamma)
          Construct a GammaFilter.
GammaFilter(float rGamma, float gGamma, float bGamma)
          Construct a GammaFilter.
 
Method Summary
 float getGamma()
          Get the gamma level.
protected  void initialize()
           
 void setGamma(float gamma)
          Set the gamma level.
 void setGamma(float rGamma, float gGamma, float bGamma)
          Set the gamma levels.
 java.lang.String toString()
           
 
Methods inherited from class com.jhlabs.image.TransferFilter
filter, filterRGB, getLUT, makeTable, transferFunction
 
Methods inherited from class com.jhlabs.image.PointFilter
setDimensions
 
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GammaFilter

public GammaFilter()
Construct a GammaFilter.


GammaFilter

public GammaFilter(float gamma)
Construct a GammaFilter.

Parameters:
gamma - the gamma level for all RGB channels

GammaFilter

public GammaFilter(float rGamma,
                   float gGamma,
                   float bGamma)
Construct a GammaFilter.

Parameters:
rGamma - the gamma level for the red channel
gGamma - the gamma level for the blue channel
bGamma - the gamma level for the green channel
Method Detail

setGamma

public void setGamma(float rGamma,
                     float gGamma,
                     float bGamma)
Set the gamma levels.

Parameters:
rGamma - the gamma level for the red channel
gGamma - the gamma level for the blue channel
bGamma - the gamma level for the green channel
See Also:
getGamma()

setGamma

public void setGamma(float gamma)
Set the gamma level.

Parameters:
gamma - the gamma level for all RGB channels
See Also:
getGamma()

getGamma

public float getGamma()
Get the gamma level.

Returns:
the gamma level for all RGB channels
See Also:
setGamma(float, float, float)

initialize

protected void initialize()
Overrides:
initialize in class TransferFilter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object