org.shapelogic.color
Class ColorDistanceWithImage1

java.lang.Object
  extended by org.shapelogic.color.ColorDistance1
      extended by org.shapelogic.color.ColorDistanceWithImage1
All Implemented Interfaces:
IColorDistance, IColorDistanceWithImage

public class ColorDistanceWithImage1
extends ColorDistance1
implements IColorDistanceWithImage

ColorDistance with an image so you can ask the distance based on x,y coordinates.

Author:
Sami Badawi

Field Summary
protected  SLImage _image
           
protected  int _lineStride
           
protected  byte[] _pixels
           
 
Fields inherited from class org.shapelogic.color.ColorDistance1
_referenceColor, INSTANCE
 
Constructor Summary
ColorDistanceWithImage1()
           
 
Method Summary
 double distanceToReferenceColor(int x, int y)
           
 SLImage getImage()
           
 void setImage(SLImage image)
           
 
Methods inherited from class org.shapelogic.color.ColorDistance1
distance, distance, distance, distanceToReferenceColor, getInstance, setReferenceColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.shapelogic.color.IColorDistance
distance, distance, distance, distanceToReferenceColor, setReferenceColor
 

Field Detail

_pixels

protected byte[] _pixels

_image

protected SLImage _image

_lineStride

protected int _lineStride
Constructor Detail

ColorDistanceWithImage1

public ColorDistanceWithImage1()
Method Detail

distanceToReferenceColor

public double distanceToReferenceColor(int x,
                                       int y)
Specified by:
distanceToReferenceColor in interface IColorDistanceWithImage

getImage

public SLImage getImage()
Specified by:
getImage in interface IColorDistanceWithImage

setImage

public void setImage(SLImage image)
Specified by:
setImage in interface IColorDistanceWithImage


Copyright © 2009. All Rights Reserved.