blobs
Class BlobInPixelSource

java.lang.Object
  extended byblobs.Blob
      extended byblobs.BlobInPixelSource
All Implemented Interfaces:
java.lang.Cloneable, Growable
Direct Known Subclasses:
BrightBlob, DarkBlob, NRGBColor, RGBColor, Skin

public abstract class BlobInPixelSource
extends Blob


Field Summary
 
Fields inherited from class blobs.Blob
debugLevel
 
Constructor Summary
BlobInPixelSource(PixelSource _ps)
           
BlobInPixelSource(PixelSource _ps, java.awt.image.BufferedImage _debugImage)
           
BlobInPixelSource(PixelSource _ps, java.awt.image.BufferedImage _debugImage, java.lang.String _type)
           
 
Method Summary
 boolean doesPixelQualify(int[] rgb)
          This is the most likely function for you to override.
 int[] getPixel(int _x, int _y)
           
 boolean newPoint(int _x, int _y)
          This override the newpoint in the growth.
 
Methods inherited from class blobs.Blob
debugAll, debugPixel, finishedSeed, getArea, getBirthDate, getDebugLevel, getDebugString, getLastX, getLastY, getMidPoint, getNextExpectedPostion, getOutsidePolygon, getPolygon, getRect, getSearchField, getSmoothedPostion, getTimeStamp, getTotalDebugLevels, getType, getValidsInARow, newBorderPoint, newFrame, newSeed, setBirthDate, setDebugColor, setDebugLevel, setDebugString, setLastValidTime, setSearchField, setType, validate, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobInPixelSource

public BlobInPixelSource(PixelSource _ps)

BlobInPixelSource

public BlobInPixelSource(PixelSource _ps,
                         java.awt.image.BufferedImage _debugImage)

BlobInPixelSource

public BlobInPixelSource(PixelSource _ps,
                         java.awt.image.BufferedImage _debugImage,
                         java.lang.String _type)
Method Detail

doesPixelQualify

public boolean doesPixelQualify(int[] rgb)
This is the most likely function for you to override. Your critera for a good pixel are encoded here.

Parameters:
rgb - array with red in 1, green in 2 and blue in 3;
Returns:

newPoint

public boolean newPoint(int _x,
                        int _y)
This override the newpoint in the growth. Called everytime the search routines hit a new pixel

Specified by:
newPoint in interface Growable
Overrides:
newPoint in class Blob

getPixel

public int[] getPixel(int _x,
                      int _y)