# InspectEdge Vision Data Access Functions

This topic lists the Vision Data Access functions that get values from an InspectEdge structure. Each of the following functions references a data structure for the first parameter. Index (zero-based) determines which is being indexed from the structure.

Note: All of the formulas for the InspectEdge functions conform to the following:

- InspectEdgeForDefect/ Position/ Width = An Inspect data structure output by the specified function
- Caliper Index = 0 to N (the total number of Calipers is equal to the number of Calipers output by the InspectEdge function that the InspectEdgeForDefect/ Position/ Width function is referencing)
- Edge Pair Index = 0 or 1 (determines which line fit to reference; 0 = the first line fit, and 1 = the second line fit)
- Edge Index = 0 to N
- Point Index = 0 to 1

Function | Description
--- | ---
GetCaliperAngle(InspectEdge, [Caliper Index]) | Returns the angle value of the indexed Caliper.
GetCaliperHeight(InspectEdge, [Caliper Index]) | Returns the Height of the indexed Caliper.
GetCaliperWidth(InspectEdge, [Caliper Index]) | Returns the width value of the indexed Caliper.
GetCaliperX(InspectEdge, [Caliper Index]) | Returns the x-coordinate of the indexed Caliper.
GetCaliperY(InspectEdge, [Caliper Index]) | Returns the y-coordinate of the indexed Caliper.
GetDefectExtremumCaliper (InspectEdgeForDefect, Defect Index, Edge Pair Index, Closest/Furthest) | Returns the caliper index within the specified defect that contains the furthest or nearest point from the line fit. (Defaults = 0; 0 = the nearest, and 1 = the furthest)
GetDefectFilterCount(InspectEdgeForDefect, Edge Pair Index, Filter Direction) | Returns the number of defects that have been or would be filtered from the resultant data set. Filter Direction (Right = 1, Left = 2).
GetDefectGapBoundsAngle (InspectEdgeForDefect/Width, Defect/Gap Index, Defect/Gap, Edge Pair Index) | Returns the angle of the defect's bounding rectangle.
GetDefectGapBoundsCurve(InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the curve of the defect's bounding rectangle.
GetDefectGapBoundsHeight (InspectEdgeForDefect/Width, Defect/Gap Index, Defect/Gap, Edge Pair Index) | Returns the height of the defect's bounding rectangle.
GetDefectGapBoundsWidth (InspectEdgeForDefect/Width, Defect/Gap Index, Defect/Gap, Edge Pair Index) | Returns the width of the defect's bounding rectangle.
GetDefectGapBoundsX (InspectEdgeForDefect/Width, Defect/Gap Index, Defect/Gap, Edge Pair Index) | Returns the x-coordinate of the defect's bounding rectangle.
GetDefectGapBoundsY (InspectEdgeForDefect/Width, Defect/Gap Index, Defect/Gap, Edge Pair Index) | Returns the y-coordinate of the defect's bounding rectangle.
GetDefectGapCaliperIndex (InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index], [Defect Start/Stop]) | Returns the Caliper in which the defect starts or stops (Start = 0, End = 1).
GetDefectGapCount(InspectEdgeForDefect, [[Edge Pair] Index]) | Returns the number of defects or gaps, depending on which is specified (Defects = 0, Gap = 1; Size = 0, Area = 1).
GetDefectGapExtremumValue (InspectEdgeForDefect/Width, [Defect/Gap/Position], [Edge Pair Index], [Max/Min], [Size/Area/Width]) | Returns the maximum or minimum value for the size, area or width of defects or gaps (Defects = 0, Gap = 1 and Position = 2; Maximum = 0 and Minimum = 1; Size = 0, Area = 1, Width = 2).
GetDefectGapValue (InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap/Position], [Edge Pair Index], [Size/Area/Width or Distance]) | Returns the size, area, width or cumulative size/area/width for one or all gap(s) by size, area or width (Defect = 0, Gap = 1 and -1 = the sum of all gaps by size, area or width; Defects = 0, Gap = 1 and Position = 2; Size = 0, Area = 1, Width = 2).
GetEdgeContrast(Inspect, [Caliper Index], [Edge Index], [Edge Pair Index[) | Returns the Contrast value for the indexed Caliper's edge.
GetEdgeCount(InspectEdgeForDefect, [Caliper Index]) | Returns the number of edges found in the indexed Caliper.
GetEdgeFromCenter (InspectEdgeForDefect/Position, [Caliper Index], [Edge Pair Index], [Edge Index]) | Returns the distance from the indexed Caliper's specified edge from the center of the ROI.
GetEdgeFromFit (InspectEdgeForDefect, [Caliper Index], [Edge Pair Index]) | Returns the distance from the referenced Caliper's edge to the line fit.
GetEdgeFromRegion (InspectEdgeForDefect, [Caliper Index], [Edge Index], [Edge Pair Index], [Direction]) | Returns the distance from the search region to the indexed edge of the indexed Caliper.
GetEdgePairCount(InspectEdgeWidth, [Caliper Index]) | Returns the number of edge pairs within the indexed Caliper.
GetEdgePairWidth (InspectEdgeWidth, [Caliper Index], [Edge Pair Index]) | Returns the width value of the specified edge pair within the indexed Caliper. Note: Specifying an index of 0 for the Edge Pair Index returns only the top scoring edge pair within the indexed Caliper.
GetEdgePairX (InspectEdgeWidth, [Caliper Index], [Edge Index], [Edge Pair Index]) | Returns the x-coordinate of the specified edge pair within the indexed Caliper.
GetEdgePairY (InspectEdgeWidth, Caliper Index, Edge Pair Index) | Returns the y-coordinate of the specified edge pair within the indexed Caliper.
GetEdgePosContrast (InspectEdgePosition, [Caliper Index], [Edge Index]) | Returns the contrast of the indexed Caliper's specified edge.
GetEdgePosFromCenter (InspectEdgePosition, [Caliper Index], [Edge Index]) | Returns the distance from the indexed Caliper's specified edge to the center of the ROI.
GetEdgePosFromFit (InspectEdgePosition, [Caliper Index]) | Returns the distance from the indexed Caliper's edge to the line fit.
GetEdgePosFromRegion (InspectEdgePosition, [Caliper Index], [Edge Index], [Direction]) | Returns the distance from the search region to the indexed edge of the indexed Caliper.
GetEdgePosScore (InspectEdgePosition, [Caliper Index], [Edge Index]) | Returns the score of the indexed Caliper's specified edge.
GetEdgePosX (InspectEdgePosition, [Caliper Index], [Edge Index]) | Returns the x-coordinate of the specified Caliper's edge position.
GetEdgePosY (InspectEdgePosition, [Caliper Index], [Edge Index]) | Returns the y-coordinate of the specified Caliper's edge position.
GetEdgeScore (Inspect, [Caliper Index], [Edge Index]) | Returns the edge score of each edge detected within the indexed caliper.
GetEdgeX (InspectEdgeForDefect, [Caliper Index], [Edge Index] or [Edge Pair Index]) | Returns the x-coordinate for the indexed Caliper's edge.
GetEdgeY (InspectEdgeForDefect, [Caliper Index], [Edge Index] or [Edge Pair Index]) | Returns the y-coordinate for the indexed Caliper's edge.
GetExtremePoints (InspectEdgeForDefect, [Edge Pair Index], [Side]) | Returns the index of the Caliper whose edge is furthest from the line fit (Near = 0 and Far = 1).
GetExtremePosPoints(InspectEdgePosition, [Side]) | Returns the index of the Caliper whose edge is furthest from the line fit on either side (Near = 0 and Far = 1), or, if the Line Fit is set to None, returns the points nearest either edge of the Region.
GetExtremeWidth (InspectEdgeWidth, [Extreme]) | Returns the index of the Caliper which contains the specified extreme width (Thinnest = 0 and Thickest = 1).
GetFitEdgeAngle(InspectEdgeForDefect, [Edge Pair Index]) | Returns the angle value of the specified edge pair within the indexed Caliper.
GetFitEdgeCenterX (InspectEdgeForDefect, Point Index) | Returns the x-coordinate of the center of a Circle Line Fit.
GetFitEdgeCenterY (InspectEdgeForIndex, Point Index) | Returns the y-coordinate of the center of a Circle Line Fit.
GetFitEdgePosAngle(InspectEdgePosition) | Returns the angle value of the of the line fit, calculated from the first point.
GetFitEdgePosCenterX (InspectEdgePosition) | Returns the x-coordinate of the center of a Circle Line Fit.
GetFitEdgePosCenterY(InspectEdgePosition) | Returns the y-coordinate of the center of a Circle Line Fit.
GetFitEdgePosRadius(InspectEdgePosition) | Returns the distance from the center of a Circle Line Fit.
GetFitEdgePosX (InspectEdgePosition, [Point Index]) | Returns the x-coordinate of the specified point of the line fit.
GetFitEdgePosY (InspectEdgePosition, [Point Index]) | Returns the y-coordinate of the specified point of the line fit.
GetFitEdgeRadius(InspectEdgeForDefect, [Edge Pair Index]) | Returns the distance from the center of the circle line fit for the selected Edge Pair.
GetFitEdgeX (InspectEdgeForDefect, Edge Pair Index, Point Index) | Returns the x-coordinate of the specified point.
GetFitEdgeY (InspectEdgeForDefect, Edge Pair Index, Point Index) | Returns the y-coordinate of the specified point.
GetIEFitError(InspectEdgeForDefect/Position, [Edge Index]) | Returns the error value for the accuracy of the line or circle fit for the indexed line or circle.
GetNumCalipers(InspectEdge) | Returns the total number of Calipers within the specified InspectEdge function.
GetNumCalipersUsed(InspectEdgeForDefect/Position, [Edge Pair Index]) | Returns the number of Calipers used to construct a line fit or Circle Line Fit. Use the returned value in relation to the value returned by the GetNumCalipers function to determine the percentage of Calipers used to construct the line fit or Circle Line Fit. Optionally, when referencing an InspectEdgeForDefect function with the Find Edge Pairs parameter enabled, specify 0 in the Edge Pair Index to return the number of Calipers used on the first edge, or specify 1 to return the number of Calipers used on the second edge.
GetTotalCount(InspectEdge/ForDefect/Position/Width) | Returns the total number of results for the referenced InspectEdge, InspectEdgeForDefect, InspectEdgePosition or InspectEdgeWidth function.
GetWidth(InspectEdgeWidth, [Caliper Index]) | Returns the width value of the edge within the indexed Caliper; returns 0 if no edges are found within the indexed Caliper.
GetWidthAverage(InspectEdgeWidth) | Returns the average width value from the referenced InspectEdgeWidth function. If the edge pair has a gap or a defect that is outside of its minimum/maximum range, the width value will not be used in the calculation of the average.
GetWidthCaliperCount(InspectEdgeWidth, [Without/With], [Actual/Percent]) | Returns either the number or percent of Calipers either containing or not containing defects (Without = 0 and With = 1; Actual = 0 and Percent = 1).
GetWidthCaliperExtremum(InspectEdgeWidth, [Without/With], [Smallest/Largest]) | Returns the smallest or largest block of Calipers that either contain or do not contain defects (Without = 0 and With =1; Smallest = 0 and Largest = 1).
GetWidthCount(InspectEdgeWidth, [Defects/Gaps]) | Returns the total number of specified defects or gaps (Defects = 0, Gaps = 1).
GetWidthStdDev(InspectEdgeWidth) | Returns the standard deviation of the width values from the referenced InspectEdgeWidth function. If the edge pair has a gap or a defect that is outside of its minimum/maximum range, that width value will not be used in the calculation of the standard deviation.
GetWidthThresholdCount(InspectEdgeWidth, [Above/Below], [Actual/Percent]) | Returns the number of defects that are either above or below the Width threshold (Above = 0 and Below = 1; Actual = 0 and Percent = 1).
GetWidthThresholdExtremum(InspectEdgeWidth, [Above/Below], [Smallest/Largest]) | Returns the Size, Area or Width value for the smallest or largest defect that is either above or below the Width threshold (Above = 0 and Below = 1; Smallest = 0 and Largest = 1; Size = 0, Area = 1 and Width = 2).
GetWidthTotalCaliperSize(InspectEdgeWidth, [Without/With]) | Returns the cumulative size of all the Calipers either with or without defects (Without = 0 and With =1).
GetWidthTotalDefectSize(InspectEdgeWidth, [Above/Below]) | Returns the cumulative size of all defects either above or below the Width threshold (Above = 0 and Below = 1).