edu.tamu.bpaulson.newrecognizer
Class ArcFit

java.lang.Object
  extended by edu.tamu.bpaulson.newrecognizer.ArcFit
All Implemented Interfaces:
CircularFit, Fit, StrokeThresholds

public class ArcFit
extends java.lang.Object
implements Fit, CircularFit, StrokeThresholds

ArcFit class - fit a stroke to an arc

Author:
bpaulson

Field Summary
 
Fields inherited from interface edu.tamu.bpaulson.newrecognizer.Fit
ARC, ARC_INT, CIRCLE, CIRCLE_INT, COMPLEX, COMPLEX_INT, CURVE, CURVE_INT, ELLIPSE, ELLIPSE_INT, HELIX, HELIX_INT, LINE, LINE_INT, POLYLINE, POLYLINE_INT, SPIRAL, SPIRAL_INT
 
Fields inherited from interface edu.tamu.bpaulson.newrecognizer.StrokeThresholds
M_ARC_AREA_RATIO, M_ARC_FEATURE_AREA, M_AXIS_RATIO_TO_BE_CIRCLE, M_CIRCLE_CORNER_LENGTH_RATIO, M_CIRCLE_FEATURE_AREA, M_CIRCLE_SMALL, M_CORNER_BRANDON_DIS_PERCENT, M_CORNER_BRANDON_SIM_SLOPE, M_CORNER_MAXDISTANCETOADJACENT, M_CORNER_MAXDISTANCETOSPEED, M_CORNER_MINANGLEDIFF, M_CURVE_CORNER_LENGTH_RATIO, M_CURVE_ERROR, M_DCR_TO_BE_POLYLINE, M_DCR_TO_BE_POLYLINE_STRICT, M_ELLIPSE_CORNER_LENGTH_RATIO, M_ELLIPSE_FEATURE_AREA, M_ELLIPSE_SMALL, M_ENDPT_STROKE_LENGTH_RATIO, M_HOOK_MAXHOOKLENGTH, M_HOOK_MAXHOOKPERCENT, M_HOOK_MINHOOKCURVATURE, M_HOOK_MINPOINTS, M_HOOK_MINSTROKELENGTH, M_LINE_FEATURE_AREA, M_LINE_LS_ERROR_FROM_ENDPTS, M_NDDE_HIGH, M_NEIGHBORHOOD_PCT, M_NUM_REVS_TO_BE_COMPLETE, M_PERCENT_DISTANCE_TO_BE_COMPLETE, M_POLYLINE_LS_ERROR, M_POLYLINE_SUBSTROKES_LOW, M_RATIO_TO_REMOVE_TAIL, M_REVS_TO_BE_CIRCULAR, M_REVS_TO_BE_OVERTRACED, M_SLOPE_DIFF, M_SPIRAL_CENTER_CLOSENESS, M_SPIRAL_DIAMETER_CLOSENESS, M_SPIRAL_RADIUS_RATIO
 
Constructor Summary
ArcFit(BStroke stroke)
          Constructor for the arc fit
 
Method Summary
 java.awt.Shape get2DShape()
          Get the beautified version of the shape in a Graphics2D shape
 java.awt.geom.Point2D getCenter()
           
 double getError()
          Get the error of the fit
 java.lang.String getName()
          Get the name of the fit (name of shape)
 double getRadius()
           
 DrawnShape getShape()
          Get the beautified (ideal) version of the shape
 boolean passed()
          Specifies whether preliminary shape fit tests passed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcFit

public ArcFit(BStroke stroke)
Constructor for the arc fit

Parameters:
stroke - stroke to fit arc to
Method Detail

getError

public double getError()
Description copied from interface: Fit
Get the error of the fit

Specified by:
getError in interface Fit
Returns:
error of fit

getName

public java.lang.String getName()
Description copied from interface: Fit
Get the name of the fit (name of shape)

Specified by:
getName in interface Fit
Returns:
name of fit

getShape

public DrawnShape getShape()
Description copied from interface: Fit
Get the beautified (ideal) version of the shape

Specified by:
getShape in interface Fit
Returns:
beautified version of shape

get2DShape

public java.awt.Shape get2DShape()
Description copied from interface: Fit
Get the beautified version of the shape in a Graphics2D shape

Specified by:
get2DShape in interface Fit
Returns:
Graphics2D version of beautified shape

passed

public boolean passed()
Description copied from interface: Fit
Specifies whether preliminary shape fit tests passed

Specified by:
passed in interface Fit
Returns:
true if prelim tests passed; else false

getRadius

public double getRadius()
Specified by:
getRadius in interface CircularFit

getCenter

public java.awt.geom.Point2D getCenter()
Specified by:
getCenter in interface CircularFit