org.shapelogic.imageprocessing
Class SBColorCompare

java.lang.Object
  extended by org.shapelogic.imageprocessing.SBSimpleCompare
      extended by org.shapelogic.imageprocessing.SBColorCompare
All Implemented Interfaces:
SBPixelCompare

public class SBColorCompare
extends SBSimpleCompare

Compare implementations for RGB.

Author:
Sami Badawi

Field Summary
 
Fields inherited from class org.shapelogic.imageprocessing.SBSimpleCompare
bitSet, currentColor, fillWithOwnColor, handledColor, ip, mask, maxDist, numberOfPixels
 
Constructor Summary
SBColorCompare()
           
 
Method Summary
 void action(int index)
          This used for changes to other images or say modify all colors to the first found.
 int colorDistance(int color1, int color2)
          split color coded as int into 3 int
 void init(ij.process.ImageProcessor ipIn)
          Call at start, this might also work as a reset
 boolean similar(int index)
          Tells if the color at index is close enought the set color to be considered part of the segmented area.
 
Methods inherited from class org.shapelogic.imageprocessing.SBSimpleCompare
factory, getCurrentColor, getHandledColor, getMaxDist, getNumberOfPixels, grabColorFromPixel, isHandled, newSimilar, setCurrentColor, setHandled, setHandledColor, setMaxDist, splitColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SBColorCompare

public SBColorCompare()
Method Detail

similar

public boolean similar(int index)
Tells if the color at index is close enought the set color to be considered part of the segmented area.

Parameters:
index - to image

init

public void init(ij.process.ImageProcessor ipIn)
          throws java.lang.Exception
Description copied from class: SBSimpleCompare
Call at start, this might also work as a reset

Specified by:
init in interface SBPixelCompare
Overrides:
init in class SBSimpleCompare
Throws:
java.lang.Exception

colorDistance

public int colorDistance(int color1,
                         int color2)
split color coded as int into 3 int


action

public void action(int index)
This used for changes to other images or say modify all colors to the first found.



Copyright © 2007. All Rights Reserved.