j2d.hpp
Class LinearMappingProcessor
java.lang.Object
   j2d.ImageProcessor
j2d.ImageProcessor
       j2d.hpp.LinearMappingProcessor
j2d.hpp.LinearMappingProcessor
- All Implemented Interfaces: 
- java.awt.image.ImageObserver
- public class LinearMappingProcessor 
- extends ImageProcessor
This classes allows adjustment of the brightness (DC offset) and
 contrast (intensity stretch) of an image.
 
| Fields inherited from interface java.awt.image.ImageObserver | 
| ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH | 
 
 
| Method Summary | 
|  void | processImage()Implementation of ImageProcessor
 | 
|  float[] | setOptimalParameters()Set offset and slope to maximize the use of the dynamic range.
 | 
|  void | setParameters(double offset,
              double slope)Set the processing parameters.
 | 
 
 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
LinearMappingProcessor
public LinearMappingProcessor()
- Create a new LinearMappingProcessor
 
processImage
public void processImage()
                  throws java.lang.Exception
- Implementation of ImageProcessor
 
- 
- Specified by:
- processImagein class- ImageProcessor
 
- 
- Throws:
- java.lang.Exception
 
setParameters
public void setParameters(double offset,
                          double slope)
- Set the processing parameters.
 
- 
 
setOptimalParameters
public float[] setOptimalParameters()
- Set offset and slope to maximize the use of the dynamic range.
 To apply the parameters to the image, this must be followed by
 a call to performAlgorithm().
 
- 
- Returns:
- Two-element array.  Element 0 contains the
                      offset (brightness adjustment).  Element 1
                      contains the slope (contrast adjustment).