j2d.hpp
Class LinearMappingProcessor

java.lang.Object
  extended by j2d.ImageProcessor
      extended by 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.


Field Summary
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
LinearMappingProcessor()
          Create a new LinearMappingProcessor
 
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 j2d.ImageProcessor
getBaseImage, getBaseImageHeight, getBaseImageWidth, getPixels, getProcessedImage, imageUpdate, openImage, setBaseImage, setPixels
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearMappingProcessor

public LinearMappingProcessor()
Create a new LinearMappingProcessor

Method Detail

processImage

public void processImage()
                  throws java.lang.Exception
Implementation of ImageProcessor

Specified by:
processImage in 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).