org.shapelogic.imageprocessing
Class ColorReplacePixelHandler

java.lang.Object
  extended by org.shapelogic.imageprocessing.ColorReplacePixelHandler
All Implemented Interfaces:
HasSLImage, PixelHandler

public class ColorReplacePixelHandler
extends java.lang.Object
implements PixelHandler, HasSLImage

Handles Color Replace for individual pixel, used with wrapper to work on whole image.
Example of a PixelHandler that can be used to change a whole image.

Author:
Sami Badawi

Field Summary
protected  IColorDistance _colorDistance
           
protected  SLImage _image
           
static double maxDistance
           
static int referenceColor
           
 
Constructor Summary
ColorReplacePixelHandler()
           
 
Method Summary
 IColorDistance getColorDistance()
           
 void putPixel(int x, int y, int color)
          Handle a pixel with a color and a coordinate.
 void setColorDistance(IColorDistance _colorDistance)
           
 void setImage(SLImage image)
          Should only be implemented if the PixelHandler needs to know what image it is using.
 void setup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxDistance

public static double maxDistance

referenceColor

public static int referenceColor

_colorDistance

protected IColorDistance _colorDistance

_image

protected SLImage _image
Constructor Detail

ColorReplacePixelHandler

public ColorReplacePixelHandler()
Method Detail

setup

public void setup()

putPixel

public void putPixel(int x,
                     int y,
                     int color)
Description copied from interface: PixelHandler
Handle a pixel with a color and a coordinate.

Specified by:
putPixel in interface PixelHandler

getColorDistance

public IColorDistance getColorDistance()

setColorDistance

public void setColorDistance(IColorDistance _colorDistance)

setImage

public void setImage(SLImage image)
Description copied from interface: HasSLImage
Should only be implemented if the PixelHandler needs to know what image it is using.

Specified by:
setImage in interface HasSLImage


Copyright © 2008. All Rights Reserved.