Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions | Properties
ILEdgeGaugeResult Interface Reference

This interface holds an edge gauging result and is used to access its properties. More...

Inheritance diagram for ILEdgeGaugeResult:
ILObjects ILObject LEdgeGaugeResult

Public Member Functions

void Draw (HDC hdc, LPVGaugeDrawFlags drawFlags, double zoomX, double zoomY, double panX, double panY)
 
void DrawScoreChart (HDC hdc, LPVChartDrawFlags drawFlags, int xGridStep, int yGridStep)
 
double GetDistanceMetric (LPVAggregation aggType)
 
ILLineGetEdge (int index)
 
void GetEdgePair (int index, ILLine **edgeLine1, ILLine **edgeLine2)
 
- Public Member Functions inherited from ILObjects
int Count ()
 
BOOL Empty ()
 
ILObjectItemObject (int objIndex)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Properties

double Distance (int index) [get]
 The distance between the double-side edges. Return 0 for single-side edge result. More...
 
ILLine Edge1 (int index) [get]
 The first edges in the result. More...
 
ILLine Edge2 (int index) [get]
 The second edges in the result. Return null for single-side edge result. More...
 
ILPoints SamplePoints [get]
 All the valid sample points found in sample regions.
 
double Score1 (int index) [get]
 The score of the first edges in the result. More...
 
double Score2 (int index) [get]
 The score of the second edges in the result. Return 0 for single-side edge result. More...
 

Detailed Description

This interface holds an edge gauging result and is used to access its properties.

Usually you get the LEdgeGaugeResult object from the edge inspection tool LEdgeGauge. You can then use this interface to access to the edge lines and the details such as sample points, and draw the result on graphics windows.

Example Code

Member Function Documentation

◆ Draw()

void Draw ( HDC  hdc,
LPVGaugeDrawFlags  drawFlags,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw the result onto provide device context.

Parameters
[in]drawFlagsControl the drawing behavior, see LPVGaugeDrawFlags
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ DrawScoreChart()

void DrawScoreChart ( HDC  hdc,
LPVChartDrawFlags  drawFlags,
int  xGridStep,
int  yGridStep 
)

Draw a score chart onto provide device context. It represents the score(y axis) distributions along the sample region's direction(x axis). It's useful for determining a proper acceptable score.

Parameters
[in]hdcHandle to the device context of the destination window or bitmap.
[in]drawFlagsFlags to control which part of a data chart should be drawn, see LPVChartDrawFlags for usage.
[in]xGridStepSpecify the step of label on x axis, 0 means we'll determine it on the fly according to the score data.
[in]yGridStepSpecify the step of label on y axis, 0 means we'll determine it on the fly according to the score data. This function is currently not available on Linux / MacOS platform.

◆ GetDistanceMetric()

double GetDistanceMetric ( LPVAggregation  aggType)

The aggregation metric of all the edge pairs' distances, such as mean, sum, minimum, etc. Return 0 for single-side edge result.

Parameters
[in]aggTypeThe aggregation type
Return values
valReturn the metric value
See also
Distance

◆ GetEdge()

ILLine* GetEdge ( int  index)

Fetch the result edge line with the given index, for single-side edge inspection.

Parameters
[in]indexThe input index, it should be a 0-based number smaller than total count of result edges.
Return values
edgeLineReturn the result edge line. Usually, the line's middle point is the same as the corresponding sample point.
See also
Count(), Edge1

◆ GetEdgePair()

void GetEdgePair ( int  index,
ILLine **  edgeLine1,
ILLine **  edgeLine2 
)

Fetch the result edge line pair with the given index, for double-side edge inspection.

Parameters
[in]indexThe input index, it should be a 0-based number smaller than total count of result edge pairs.
[out]edgeLine1Output the first edge line of the pair. Usually, the line's middle point is the same as the corresponding sample point.
[out]edgeLine2Output the second edge line of the pair. Usually, the line's middle point is the same as the corresponding sample point.
See also
Count(), Edge1, Edge2, Distance

Property Documentation

◆ Distance

double Distance( int index)
get

The distance between the double-side edges. Return 0 for single-side edge result.

Parameters
[in]indexThe input index, it should be a 0-based number smaller than total count of result edge pairs.
See also
Count()

◆ Edge1

ILLine Edge1( int index)
get

The first edges in the result.

Parameters
[in]indexThe input index, it should be a 0-based number smaller than total count of result edges or edge pairs.
See also
Count()

◆ Edge2

ILLine Edge2( int index)
get

The second edges in the result. Return null for single-side edge result.

Parameters
[in]indexThe input index, it should be a 0-based number smaller than total count of result edge pairs.
See also
Count()

◆ Score1

double Score1( int index)
get

The score of the first edges in the result.

Parameters
[in]indexThe input index, it should be a 0-based number smaller than total count of result edges or edge pairs.
See also
Count()

◆ Score2

double Score2( int index)
get

The score of the second edges in the result. Return 0 for single-side edge result.

Parameters
[in]indexThe input index, it should be a 0-based number smaller than total count of result edge pairs.
See also
Count()