j2d.thresh
Class ThresholdProcessor

java.lang.Object
  extended by j2d.thresh.ThresholdProcessor
All Implemented Interfaces:
HppFilterInterface, ImageProcessorInterface, java.io.Serializable

public class ThresholdProcessor
extends java.lang.Object
implements HppFilterInterface, ImageProcessorInterface

See Also:
Serialized Form

Constructor Summary
ThresholdProcessor(double threshold)
          The pixel value ranges from 0..255
 
Method Summary
 short getB(int b)
           
 short getG(int g)
           
 short getR(int r)
           
 java.awt.Image process(java.awt.Image img)
          a basic garbage in, garbage out processor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThresholdProcessor

public ThresholdProcessor(double threshold)
The pixel value ranges from 0..255

Parameters:
threshold - a value that ranges from 0..255
Method Detail

process

public java.awt.Image process(java.awt.Image img)
Description copied from interface: ImageProcessorInterface
a basic garbage in, garbage out processor.

Specified by:
process in interface ImageProcessorInterface
Parameters:
img - input image
Returns:
output image

getR

public short getR(int r)
Specified by:
getR in interface HppFilterInterface

getG

public short getG(int g)
Specified by:
getG in interface HppFilterInterface

getB

public short getB(int b)
Specified by:
getB in interface HppFilterInterface