org.shapelogic.imageprocessing
Class EdgeTracer

java.lang.Object
  extended by org.shapelogic.imageprocessing.EdgeTracer
All Implemented Interfaces:
IEdgeTracer

public class EdgeTracer
extends java.lang.Object
implements IEdgeTracer

Edge Tracer.
The first version is based on Wand from ImageJ 1.38.
It traces with a 2 x 2 square that put the top left pixels inside the particle and the bottom right outside.
Might be replaced with a version that has all the pixels inside.

Author:
Sami Badawi

Field Summary
static int STEP_SIZE_FOR_4_DIRECTIONS
           
 
Constructor Summary
EdgeTracer(SLImage image, int referenceColor, double maxDistance, boolean traceCloseToColor)
          Constructs a Wand object from an ImageProcessor.
 
Method Summary
 Polygon autoOutline(int startX, int startY)
          Traces the boundary of an area of uniform color, where 'startX' and 'startY' are somewhere inside the area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STEP_SIZE_FOR_4_DIRECTIONS

public static final int STEP_SIZE_FOR_4_DIRECTIONS
See Also:
Constant Field Values
Constructor Detail

EdgeTracer

public EdgeTracer(SLImage image,
                  int referenceColor,
                  double maxDistance,
                  boolean traceCloseToColor)
Constructs a Wand object from an ImageProcessor.

Method Detail

autoOutline

public Polygon autoOutline(int startX,
                           int startY)
Traces the boundary of an area of uniform color, where 'startX' and 'startY' are somewhere inside the area. A 16 entry lookup table is used to determine the direction at each step of the tracing process.

Specified by:
autoOutline in interface IEdgeTracer


Copyright © 2008. All Rights Reserved.