# 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.

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 Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications.
- 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)
- 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. The default value is 0. Value 0 is the nearest, and 1 is 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 bounding rectangle of the defect.
GetDefectGapBoundsCurve(InspectEdgeForDefect/Width, [Defect/Gap Index], [Defect/Gap], [Edge Pair Index]) | Returns the curve of the bounding rectangle of the defect.
GetDefectGapBoundsHeight (InspectEdgeForDefect/Width, Defect/Gap Index, Defect/Gap, Edge Pair Index) | Returns the height of the bounding rectangle of the defect.
GetDefectGapBoundsWidth (InspectEdgeForDefect/Width, Defect/Gap Index, Defect/Gap, Edge Pair Index) | Returns the width of the bounding rectangle of the defect.
GetDefectGapBoundsX (InspectEdgeForDefect/Width, Defect/Gap Index, Defect/Gap, Edge Pair Index) | Returns the X-coordinate of the bounding rectangle of the defect.
GetDefectGapBoundsY (InspectEdgeForDefect/Width, Defect/Gap Index, Defect/Gap, Edge Pair Index) | Returns the Y-coordinate of the bounding rectangle of the defect.
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 edge of the caliper.
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 specified edge of the indexed caliper from the center of the ROI.
GetEdgeFromFit (InspectEdgeForDefect, [Caliper Index], [Edge Pair Index]) | Returns the distance from the edge of the referenced caliper 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 specified edge of the indexed caliper .
GetEdgePosFromCenter (InspectEdgePosition, [Caliper Index], [Edge Index]) | Returns the distance from the specified edge of the indexed caliper to the center of the ROI.
GetEdgePosFromFit (InspectEdgePosition, [Caliper Index]) | Returns the distance from the edge of the indexed caliper 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 specified edge of the indexed Caliper.
GetEdgePosX (InspectEdgePosition, [Caliper Index], [Edge Index]) | Returns the X-coordinate of the edge position of the specified caliper.
GetEdgePosY (InspectEdgePosition, [Caliper Index], [Edge Index]) | Returns the Y-coordinate of the edge position of the specified caliper.
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 edge of the indexed caliper.
GetEdgeY (InspectEdgeForDefect, [Caliper Index], [Edge Index] or [Edge Pair Index]) | Returns the Y-coordinate for the edge of the indexed caliper.
GetExtremePoints (InspectEdgeForDefect, [Edge Pair Index], [Side]) | Returns the index of the caliper whose edge is furthest from the line fit. Value 0 means near and 1 means far.
GetExtremePosPoints(InspectEdgePosition, [Side]) | Returns the index of the caliper whose edge is furthest from the line fit on either side Value 0 means near and 1 means far. 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). Value 0 means the thinnest width, and 1 means thickest width.
GetFitEdgeAngle(InspectEdgeForDefect, [Edge Pair Index]) | Returns the angle value of the specified edge pair within the indexed Ccaliper.
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 is 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 is 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).