eVision .NET API
Loading...
Searching...
No Matches
eVision.EBaseGauge Class Referenceabstract

EasyGauge base class. More...

Inheritance diagram for eVision.EBaseGauge:
Collaboration diagram for eVision.EBaseGauge:

Public Member Functions

void Draw (eVision.EDrawAdapter graphicContext, eVision.EDrawingMode drawingMode, float zoomX, float zoomY, float panX, float panY)
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision.EDrawAdapter graphicContext, eVision.EDrawingMode drawingMode, float zoomX, float zoomY, float panX)
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision.EDrawAdapter graphicContext, eVision.EDrawingMode drawingMode, float zoomX, float zoomY)
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision.EDrawAdapter graphicContext, eVision.EDrawingMode drawingMode, float zoomX)
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision.EDrawAdapter graphicContext, eVision.EDrawingMode drawingMode)
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision.EDrawAdapter graphicContext, eVision.EDrawingMode drawingMode, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision.EDrawAdapter graphicContext, eVision.EDrawingMode drawingMode, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision.EDrawAdapter graphicContext, eVision.EDrawingMode drawingMode, eVision.EFrame frame, float zoomX, float zoomY)
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision.EDrawAdapter graphicContext, eVision.EDrawingMode drawingMode, eVision.EFrame frame, float zoomX)
 Draws a graphical representation of a shape, as defined by EDrawingMode.
void Draw (eVision.EDrawAdapter graphicContext, eVision.EDrawingMode drawingMode, eVision.EFrame frame)
 Draws a graphical representation of a shape, as defined by EDrawingMode.
eVision.EEditionMode HitTest (int x, int y, float zoomX, float zoomY, float panX, float panY)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision.EEditionMode HitTest (int x, int y, float zoomX, float zoomY, float panX)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision.EEditionMode HitTest (int x, int y, float zoomX, float zoomY)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision.EEditionMode HitTest (int x, int y, float zoomX)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision.EEditionMode HitTest (int x, int y)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision.EEditionMode HitTest (int x, int y, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision.EEditionMode HitTest (int x, int y, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision.EEditionMode HitTest (int x, int y, eVision.EFrame frame, float zoomX, float zoomY)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision.EEditionMode HitTest (int x, int y, eVision.EFrame frame, float zoomX)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
eVision.EEditionMode HitTest (int x, int y, eVision.EFrame frame)
 Checks if there is a handle under the cursor and returns the corresponding edition mode.
void Drag (int x, int y, float zoomX, float zoomY, float panX, float panY)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int x, int y, float zoomX, float zoomY, float panX)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int x, int y, float zoomX, float zoomY)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int x, int y, float zoomX)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int x, int y, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int x, int y, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int x, int y, eVision.EFrame frame, float zoomX, float zoomY)
 Moves a handle to a new position and updates the position parameters of the shape.
void Drag (int x, int y, eVision.EFrame frame, float zoomX)
 Moves a handle to a new position and updates the position parameters of the shape.
void Save (string path)
 Saves a gauge.The given ESerializer must have been created for writing.
void Save (eVision.ESerializer serializer)
 Saves a gauge.The given ESerializer must have been created for writing.
void Load (string path)
 Loads a gauge.The given ESerializer must have been created for reading.
void Load (eVision.ESerializer serializer)
 Loads a gauge.The given ESerializer must have been created for reading.
bool HasProperty (string aProperty)
 Returns whether a EBaseGauge has a property named aProperty.
string GetProperty (string aProperty)
 Gets the value of property aProperty. Throws an exception if no such property exists.
void SetProperty (string aProperty, string aValue)
 Sets the value of property aProperty to aValue for this EBaseGauge.
void RemoveProperty (string aProperty)
 Removes the property name aProperty from the EBaseGauge.
bool HasValidPolarityProperty ()
 Returns whether the EBaseGauge has a valid polarity property.
eVision.ESamplePoint GetSample (uint index)
 Retrieves sampled points used during the model fitting operation.
bool HasSamples ()
 Whether the samples are available or not.
uint AddSkipRange (eVision.EIntegerRange range)
 Adds an item to the set of skip ranges and returns the index of the newly added range.
eVision.EIntegerRange GetSkipRange (uint index)
 Allows to retrieve the start and end values of the skip range corresponding to the given index, if it is valid (i.e. if it has previously been created by a call to the EBaseGauge.AddSkipRange method).
void RemoveSkipRange (uint index)
 After a call to EBaseGauge.AddSkipRange, removes the skip range with the given index.
void RemoveAllSkipRanges ()
 Removes all the skip ranges previously created by a call to EBaseGauge.AddSkipRange.
eVision.EShape Measure (eVision.EROIBW8 sourceImage, eVision.EFrame frame)
 Performs the gauge measurement.
eVision.EShape Measure (eVision.EROIBW8 sourceImage)
 Performs the gauge measurement.
eVision.EShape Measure (eVision.EROIBW8 sourceImage, eVision.ERegion region, eVision.EFrame frame)
 Performs the gauge measurement.
eVision.EShape Measure (eVision.EROIBW8 sourceImage, eVision.ERegion region)
 Performs the gauge measurement.
void MeasureWithoutFitting (eVision.EROIBW8 sourceImage, eVision.EFrame frame)
 Triggers the point location without line fitting operation.
void MeasureWithoutFitting (eVision.EROIBW8 sourceImage)
 Triggers the point location without line fitting operation.
void MeasureWithoutFitting (eVision.EROIBW8 sourceImage, eVision.ERegion region, eVision.EFrame frame)
 Triggers the point location without line fitting operation.
void MeasureWithoutFitting (eVision.EROIBW8 sourceImage, eVision.ERegion region)
 Triggers the point location without line fitting operation.
bool IsFound ()
 Flag indicating whether a measured shape has been found.
virtual eVision.ESamplePath MeasureSamplePath (eVision.EROIBW8 sourceImage, uint pathIndex, eVision.EFrame frame)
 Measures the specified sample path.
virtual eVision.ESamplePath MeasureSamplePath (eVision.EROIBW8 sourceImage, uint pathIndex)
 Measures the specified sample path.
virtual eVision.ESamplePath MeasureSamplePath (eVision.EROIBW8 sourceImage, uint pathIndex, eVision.ERegion region, eVision.EFrame frame)
 Measures the specified sample path.
virtual eVision.ESamplePath MeasureSamplePath (eVision.EROIBW8 sourceImage, uint pathIndex, eVision.ERegion region)
 Measures the specified sample path.

Static Public Member Functions

static eVision.EBaseGauge Make (string path)
 Creates a gauge of the correct type.

Properties

eVision.EShapeType Type [get]
 Shape type.
string Name [get, set]
 Name of the EBaseGauge object.
eVision.EShape Nominal [get, set]
 Nominal shape of the gauge.
eVision.EEditionMode EditionMode [get, set]
 Graphical edition mode (default: EBaseGauge.AvailableEditionModes).
virtual eVision.EEditionMode AvailableEditionModes [get]
 Returns all possible edition modes of the gauge.
bool Labeled [get, set]
 Whether to draw a label describing the gauge (default: no).
float Tolerance [get, set]
 Half thickness of the model fitting gauge.
bool HVConstraint [get, set]
 Status of the restriction on the orientation of the point location gauge or model fitting sample paths.
eVision.ETransitionType TransitionType [get, set]
 Transition type.
eVision.ETransitionChoice TransitionChoice [get, set]
 Transition choice.
uint TransitionIndex [get, set]
 Index (from 0 on) of the transition to be retained when the transition choice parameter is set to ETransitionChoice.ETransitionChoice_NthFromBegin or ETransitionChoice.ETransitionChoice_NthFromEnd.
uint Threshold [get, set]
 Threshold level used to delimit significant peaks in the data profile.
uint MinAmplitude [get, set]
 Offset added to the Threshold when a peak is to be detected.
uint MinArea [get, set]
 Minimum area value.
uint Thickness [get, set]
 Number of parallel segments used to extract the data profile.
uint Smoothing [get, set]
 Number of pixels used for the low-pass filtering operation.
bool RectangularSamplingArea [get, set]
 Flag indicating whether the sampling area remains a rectangle when rotated, instead of becoming a parallelogram.
float SamplingStep [get, set]
 Approximate distance between sampled points during a model fitting operation.
uint NumSamples [get]
 Number of sampled points during the model fitting operation.
float FilteringThreshold [get, set]
 Relative filtering threshold, that is the fraction of the average distance between the sampled points and the fitted model above which a point is filtered out.
uint NumFilteringPasses [get, set]
 Number of filtering passes for a model fitting operation.
uint NumValidSamples [get]
 Number of valid sample points remaining after a model fitting operation.
uint SamplePointIndex [get, set]
 Sampled.
float AverageDistance [get]
 Average distance between the sampled points and the fitted model.
int[] MinNumFitSamples [get, set]
 Sets/Gets the minimum number of samples required for fitting the shape.
uint NumSkipRanges [get]
 Number of skip ranges in the gauge after a call to EBaseGauge.AddSkipRange.
eVision.EShape Measured [get]
 Copy of the measured shape.

Detailed Description

EasyGauge base class.

License(s): EasyGauge

Member Function Documentation

◆ AddSkipRange()

uint eVision.EBaseGauge.AddSkipRange ( eVision.EIntegerRange range)

Adds an item to the set of skip ranges and returns the index of the newly added range.

Parameters
rangeThe skip range.

The samples indices between start and end (including the boundaries) will be discarded during the measurement process.

This method allows to define skip ranges in an EBaseGauge. This means that, at measure time, samples belonging to these ranges will not be taken into account.

A sample may belong to more than one skip range; to be discarded, a sample has to pertain to at least one range. Moreover, the skip ranges are allowed to overlap one another.

The range is allowed to be reversed (i.e. end is not required to be greater than start).

Also, start and end are not required to reference valid indices at the time of the call (i.e. the range may lie outside the current return value for EBaseGauge.NumSamples).

◆ Drag() [1/8]

void eVision.EBaseGauge.Drag ( int x,
int y,
eVision.EFrame frame,
float zoomX )

Moves a handle to a new position and updates the position parameters of the shape.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ Drag() [2/8]

void eVision.EBaseGauge.Drag ( int x,
int y,
eVision.EFrame frame,
float zoomX,
float zoomY )

Moves a handle to a new position and updates the position parameters of the shape.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ Drag() [3/8]

void eVision.EBaseGauge.Drag ( int x,
int y,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX )

Moves a handle to a new position and updates the position parameters of the shape.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ Drag() [4/8]

void eVision.EBaseGauge.Drag ( int x,
int y,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX,
float panY )

Moves a handle to a new position and updates the position parameters of the shape.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ Drag() [5/8]

void eVision.EBaseGauge.Drag ( int x,
int y,
float zoomX )

Moves a handle to a new position and updates the position parameters of the shape.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ Drag() [6/8]

void eVision.EBaseGauge.Drag ( int x,
int y,
float zoomX,
float zoomY )

Moves a handle to a new position and updates the position parameters of the shape.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ Drag() [7/8]

void eVision.EBaseGauge.Drag ( int x,
int y,
float zoomX,
float zoomY,
float panX )

Moves a handle to a new position and updates the position parameters of the shape.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ Drag() [8/8]

void eVision.EBaseGauge.Drag ( int x,
int y,
float zoomX,
float zoomY,
float panX,
float panY )

Moves a handle to a new position and updates the position parameters of the shape.

Parameters
xCurrent cursor coordinates.
yCurrent cursor coordinates.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ Draw() [1/10]

void eVision.EBaseGauge.Draw ( eVision.EDrawAdapter graphicContext,
eVision.EDrawingMode drawingMode )

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.

◆ Draw() [2/10]

void eVision.EBaseGauge.Draw ( eVision.EDrawAdapter graphicContext,
eVision.EDrawingMode drawingMode,
eVision.EFrame frame )

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
frameFrame of reference in which the gauge is located.

◆ Draw() [3/10]

void eVision.EBaseGauge.Draw ( eVision.EDrawAdapter graphicContext,
eVision.EDrawingMode drawingMode,
eVision.EFrame frame,
float zoomX )

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ Draw() [4/10]

void eVision.EBaseGauge.Draw ( eVision.EDrawAdapter graphicContext,
eVision.EDrawingMode drawingMode,
eVision.EFrame frame,
float zoomX,
float zoomY )

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ Draw() [5/10]

void eVision.EBaseGauge.Draw ( eVision.EDrawAdapter graphicContext,
eVision.EDrawingMode drawingMode,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX )

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ Draw() [6/10]

void eVision.EBaseGauge.Draw ( eVision.EDrawAdapter graphicContext,
eVision.EDrawingMode drawingMode,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX,
float panY )

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ Draw() [7/10]

void eVision.EBaseGauge.Draw ( eVision.EDrawAdapter graphicContext,
eVision.EDrawingMode drawingMode,
float zoomX )

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ Draw() [8/10]

void eVision.EBaseGauge.Draw ( eVision.EDrawAdapter graphicContext,
eVision.EDrawingMode drawingMode,
float zoomX,
float zoomY )

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ Draw() [9/10]

void eVision.EBaseGauge.Draw ( eVision.EDrawAdapter graphicContext,
eVision.EDrawingMode drawingMode,
float zoomX,
float zoomY,
float panX )

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ Draw() [10/10]

void eVision.EBaseGauge.Draw ( eVision.EDrawAdapter graphicContext,
eVision.EDrawingMode drawingMode,
float zoomX,
float zoomY,
float panX,
float panY )

Draws a graphical representation of a shape, as defined by EDrawingMode.

Parameters
graphicContextHandle of the device context on which to draw.
drawingModeIndicates how the point location or model fitting gauge must be displayed, as defined by EDrawingMode.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ GetProperty()

string eVision.EBaseGauge.GetProperty ( string aProperty)

Gets the value of property aProperty. Throws an exception if no such property exists.

Parameters
aPropertyThe name of the property.

◆ GetSample()

eVision.ESamplePoint eVision.EBaseGauge.GetSample ( uint index)

Retrieves sampled points used during the model fitting operation.

Parameters
indexIndex of the point between 0 and EBaseGauge.NumSamples

◆ GetSkipRange()

eVision.EIntegerRange eVision.EBaseGauge.GetSkipRange ( uint index)

Allows to retrieve the start and end values of the skip range corresponding to the given index, if it is valid (i.e. if it has previously been created by a call to the EBaseGauge.AddSkipRange method).

Parameters
indexIndex of the skip range.

Start is guaranteed to be smaller or equal to end.

◆ HasProperty()

bool eVision.EBaseGauge.HasProperty ( string aProperty)

Returns whether a EBaseGauge has a property named aProperty.

Parameters
aPropertyThe name of the property.

◆ HasSamples()

bool eVision.EBaseGauge.HasSamples ( )

Whether the samples are available or not.

The samples are available after a call to EBaseGauge.Measure, even if the shape was not found.

◆ HasValidPolarityProperty()

bool eVision.EBaseGauge.HasValidPolarityProperty ( )

Returns whether the EBaseGauge has a valid polarity property.

I.e. if it has a property named "polarity" whose value is either "inverted" or "direct".

The "polarity" property is mostly used to define the orientation of the gradient in a shape of a EVectorModel.

◆ HitTest() [1/10]

eVision.EEditionMode eVision.EBaseGauge.HitTest ( int x,
int y )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.

◆ HitTest() [2/10]

eVision.EEditionMode eVision.EBaseGauge.HitTest ( int x,
int y,
eVision.EFrame frame )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
frameFrame of reference in which the gauge is located.

◆ HitTest() [3/10]

eVision.EEditionMode eVision.EBaseGauge.HitTest ( int x,
int y,
eVision.EFrame frame,
float zoomX )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ HitTest() [4/10]

eVision.EEditionMode eVision.EBaseGauge.HitTest ( int x,
int y,
eVision.EFrame frame,
float zoomX,
float zoomY )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ HitTest() [5/10]

eVision.EEditionMode eVision.EBaseGauge.HitTest ( int x,
int y,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ HitTest() [6/10]

eVision.EEditionMode eVision.EBaseGauge.HitTest ( int x,
int y,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX,
float panY )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
frameFrame of reference in which the gauge is located.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ HitTest() [7/10]

eVision.EEditionMode eVision.EBaseGauge.HitTest ( int x,
int y,
float zoomX )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
zoomXHorizontal zoom factor. By default, true scale is used.

◆ HitTest() [8/10]

eVision.EEditionMode eVision.EBaseGauge.HitTest ( int x,
int y,
float zoomX,
float zoomY )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.

◆ HitTest() [9/10]

eVision.EEditionMode eVision.EBaseGauge.HitTest ( int x,
int y,
float zoomX,
float zoomY,
float panX )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.

◆ HitTest() [10/10]

eVision.EEditionMode eVision.EBaseGauge.HitTest ( int x,
int y,
float zoomX,
float zoomY,
float panX,
float panY )

Checks if there is a handle under the cursor and returns the corresponding edition mode.

Parameters
xCursor current X coordinate.
yCursor current Y coordinate.
zoomXHorizontal zoom factor. By default, true scale is used.
zoomYVertical zoom factor. By default, true scale is used.
panXHorizontal pan offset. By default, no pan is added.
panYVertical pan offset. By default, no pan is added.

◆ IsFound()

bool eVision.EBaseGauge.IsFound ( )

Flag indicating whether a measured shape has been found.

After calling Measure() on a gauge object, use IsFound() to get the status of the measurement.

◆ Load() [1/2]

void eVision.EBaseGauge.Load ( eVision.ESerializer serializer)

Loads a gauge.The given ESerializer must have been created for reading.

Parameters
serializerPointer to the ESerializer created for reading.

◆ Load() [2/2]

void eVision.EBaseGauge.Load ( string path)

Loads a gauge.The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ Make()

eVision.EBaseGauge eVision.EBaseGauge.Make ( string path)
static

Creates a gauge of the correct type.

Parameters
pathFile path

◆ Measure() [1/4]

eVision.EShape eVision.EBaseGauge.Measure ( eVision.EROIBW8 sourceImage)

Performs the gauge measurement.

For a point gauge, it locates the points along the defined path. For other gauges, it performs the model fitting operation.

Parameters
sourceImageSource image.

◆ Measure() [2/4]

eVision.EShape eVision.EBaseGauge.Measure ( eVision.EROIBW8 sourceImage,
eVision.EFrame frame )

Performs the gauge measurement.

For a point gauge, it locates the points along the defined path. For other gauges, it performs the model fitting operation.

Parameters
sourceImageSource image.
frameFrame of reference

◆ Measure() [3/4]

eVision.EShape eVision.EBaseGauge.Measure ( eVision.EROIBW8 sourceImage,
eVision.ERegion region )

Performs the gauge measurement.

For a point gauge, it locates the points along the defined path. For other gauges, it performs the model fitting operation.

Parameters
sourceImageSource image.
regionRegion to use with the source image.

◆ Measure() [4/4]

eVision.EShape eVision.EBaseGauge.Measure ( eVision.EROIBW8 sourceImage,
eVision.ERegion region,
eVision.EFrame frame )

Performs the gauge measurement.

For a point gauge, it locates the points along the defined path. For other gauges, it performs the model fitting operation.

Parameters
sourceImageSource image.
regionRegion to use with the source image.
frameFrame of reference

◆ MeasureSamplePath() [1/4]

virtual eVision.ESamplePath eVision.EBaseGauge.MeasureSamplePath ( eVision.EROIBW8 sourceImage,
uint pathIndex )
virtual

Measures the specified sample path.

The sample path contains all the detected transitions along that path and can be used to plot the profile and derivatives of that path.

Parameters
sourceImageSource image.
pathIndexIndex of the path to measure between 0 and EBaseGauge.NumSamples.

◆ MeasureSamplePath() [2/4]

virtual eVision.ESamplePath eVision.EBaseGauge.MeasureSamplePath ( eVision.EROIBW8 sourceImage,
uint pathIndex,
eVision.EFrame frame )
virtual

Measures the specified sample path.

The sample path contains all the detected transitions along that path and can be used to plot the profile and derivatives of that path.

Parameters
sourceImageSource image.
pathIndexIndex of the path to measure between 0 and EBaseGauge.NumSamples.
frameFrame of reference

◆ MeasureSamplePath() [3/4]

virtual eVision.ESamplePath eVision.EBaseGauge.MeasureSamplePath ( eVision.EROIBW8 sourceImage,
uint pathIndex,
eVision.ERegion region )
virtual

Measures the specified sample path.

The sample path contains all the detected transitions along that path and can be used to plot the profile and derivatives of that path.

Parameters
sourceImageSource image.
pathIndexIndex of the path to measure between 0 and EBaseGauge.NumSamples.
regionRegion to use with the source image.

◆ MeasureSamplePath() [4/4]

virtual eVision.ESamplePath eVision.EBaseGauge.MeasureSamplePath ( eVision.EROIBW8 sourceImage,
uint pathIndex,
eVision.ERegion region,
eVision.EFrame frame )
virtual

Measures the specified sample path.

The sample path contains all the detected transitions along that path and can be used to plot the profile and derivatives of that path.

Parameters
sourceImageSource image.
pathIndexIndex of the path to measure between 0 and EBaseGauge.NumSamples.
regionRegion to use with the source image.
frameFrame of reference

◆ MeasureWithoutFitting() [1/4]

void eVision.EBaseGauge.MeasureWithoutFitting ( eVision.EROIBW8 sourceImage)

Triggers the point location without line fitting operation.

Parameters
sourceImageSource image.

This method performs the actual measurement for each transition, but does not perform the gauge fitting. This means that individual samples will be available through the EBaseGauge.GetSample method, but the gauge position will not be changed.

Please note that the filtering will not be performed in this method, since it relies upon the fitting process. The filtering parameters will thus be unused.

For point gauge, this method is equivalent to EBaseGauge.Measure.

◆ MeasureWithoutFitting() [2/4]

void eVision.EBaseGauge.MeasureWithoutFitting ( eVision.EROIBW8 sourceImage,
eVision.EFrame frame )

Triggers the point location without line fitting operation.

Parameters
sourceImageSource image.
frameFrame of reference

This method performs the actual measurement for each transition, but does not perform the gauge fitting. This means that individual samples will be available through the EBaseGauge.GetSample method, but the gauge position will not be changed.

Please note that the filtering will not be performed in this method, since it relies upon the fitting process. The filtering parameters will thus be unused.

For point gauge, this method is equivalent to EBaseGauge.Measure.

◆ MeasureWithoutFitting() [3/4]

void eVision.EBaseGauge.MeasureWithoutFitting ( eVision.EROIBW8 sourceImage,
eVision.ERegion region )

Triggers the point location without line fitting operation.

Parameters
sourceImageSource image.
regionThe region on which to measure.

This method performs the actual measurement for each transition, but does not perform the gauge fitting. This means that individual samples will be available through the EBaseGauge.GetSample method, but the gauge position will not be changed.

Please note that the filtering will not be performed in this method, since it relies upon the fitting process. The filtering parameters will thus be unused.

For point gauge, this method is equivalent to EBaseGauge.Measure.

◆ MeasureWithoutFitting() [4/4]

void eVision.EBaseGauge.MeasureWithoutFitting ( eVision.EROIBW8 sourceImage,
eVision.ERegion region,
eVision.EFrame frame )

Triggers the point location without line fitting operation.

Parameters
sourceImageSource image.
regionThe region on which to measure.
frameFrame of reference

This method performs the actual measurement for each transition, but does not perform the gauge fitting. This means that individual samples will be available through the EBaseGauge.GetSample method, but the gauge position will not be changed.

Please note that the filtering will not be performed in this method, since it relies upon the fitting process. The filtering parameters will thus be unused.

For point gauge, this method is equivalent to EBaseGauge.Measure.

◆ RemoveAllSkipRanges()

void eVision.EBaseGauge.RemoveAllSkipRanges ( )

Removes all the skip ranges previously created by a call to EBaseGauge.AddSkipRange.

◆ RemoveProperty()

void eVision.EBaseGauge.RemoveProperty ( string aProperty)

Removes the property name aProperty from the EBaseGauge.

Parameters
aPropertyThe name of the property.

◆ RemoveSkipRange()

void eVision.EBaseGauge.RemoveSkipRange ( uint index)

After a call to EBaseGauge.AddSkipRange, removes the skip range with the given index.

Parameters
indexIndex of the skip range to remove, as returned by EBaseGauge.AddSkipRange.

◆ Save() [1/2]

void eVision.EBaseGauge.Save ( eVision.ESerializer serializer)

Saves a gauge.The given ESerializer must have been created for writing.

Parameters
serializerPointer to the ESerializer created for writing.

◆ Save() [2/2]

void eVision.EBaseGauge.Save ( string path)

Saves a gauge.The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ SetProperty()

void eVision.EBaseGauge.SetProperty ( string aProperty,
string aValue )

Sets the value of property aProperty to aValue for this EBaseGauge.

Parameters
aPropertyThe name of the property.
aValueThe value of the property.

You may use a shape property to define the orientation of the gradient in a shape of a EVectorModel. This is done by setting a property named "polarity" to "inverted" or "direct".

Additionally, you may set any property to any value for your own needs.

Property Documentation

◆ AvailableEditionModes

virtual eVision.EEditionMode eVision.EBaseGauge.AvailableEditionModes
get

Returns all possible edition modes of the gauge.

◆ AverageDistance

float eVision.EBaseGauge.AverageDistance
get

Average distance between the sampled points and the fitted model.

Irrelevant in case of a point location operation.

◆ EditionMode

eVision.EEditionMode eVision.EBaseGauge.EditionMode
getset

Graphical edition mode (default: EBaseGauge.AvailableEditionModes).

This also sets the same graphical edition mode to the nominal shape.

◆ FilteringThreshold

float eVision.EBaseGauge.FilteringThreshold
getset

Relative filtering threshold, that is the fraction of the average distance between the sampled points and the fitted model above which a point is filtered out.

Irrelevant in case of a point location operation.

During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

◆ HVConstraint

bool eVision.EBaseGauge.HVConstraint
getsetabstract

Status of the restriction on the orientation of the point location gauge or model fitting sample paths.

Sample paths are the point location gauges placed along the model to be fitted.

◆ Labeled

bool eVision.EBaseGauge.Labeled
getset

Whether to draw a label describing the gauge (default: no).

◆ Measured

eVision.EShape eVision.EBaseGauge.Measured
getabstract

Copy of the measured shape.

◆ MinAmplitude

uint eVision.EBaseGauge.MinAmplitude
getsetabstract

Offset added to the Threshold when a peak is to be detected.

When analyzing a derivative profile, a peak is made up of consecutive pixel values above Threshold. To detect weak [strong] transitions, lower [raise] the Threshold value.

To avoid interference of noise, an additional parameter is provided. The MinAmplitude parameter is an offset added to Threshold when a peak is to be detected.

When the pixel values of the derivative profile do not reach Threshold + MinAmplitude, the peak is not taken into account. Anyway, when a peak is taken into account, all the pixels with values above Threshold are considered (for more accuracy). Setting the MinAmplitude value to 0 merely cancels its effect.

◆ MinArea

uint eVision.EBaseGauge.MinArea
getsetabstract

Minimum area value.

A transition is detected if its derivative peak reaches Threshold + MinAmplitude value, and then declared valid if the area between the peak curve and the horizontal at level Threshold reaches the MinArea value.

◆ MinNumFitSamples

int [] eVision.EBaseGauge.MinNumFitSamples
getset

Sets/Gets the minimum number of samples required for fitting the shape.

In case of a ERectangleGauge, 4 values are used, one for each side of the rectangle. Value 0 is used for line and circle gauge. Values 0,1,2,3 are used for rectangle and wedge gauge in the following manner: Rectangle : Top = 0, Left = 1, Bottom = 2, Right = 3 Wedge : Outer Circle = 0, Origin Border = 1, Inner Circle = 2, End Border = 3

◆ Name

string eVision.EBaseGauge.Name
getset

Name of the EBaseGauge object.

◆ Nominal

eVision.EShape eVision.EBaseGauge.Nominal
getsetabstract

Nominal shape of the gauge.

Note that the gauge stores a copy of the shape and returns a copy of the shape. The gauge applies its EBaseGauge.EditionMode to the shape.

◆ NumFilteringPasses

uint eVision.EBaseGauge.NumFilteringPasses
getset

Number of filtering passes for a model fitting operation.

Irrelevant in case of a point location operation.

During a filtering pass, the points that are too distant from the model are discarded. During a model fitting operation, the "filtering" process can be invoked to remove outliers, i.e. points that were located significantly far away from the fitted model (so that their position is dubious).

By default, (the number of filtering passes is 0), the outliers rejection process is disabled.

◆ NumSamples

uint eVision.EBaseGauge.NumSamples
getabstract

Number of sampled points during the model fitting operation.

Irrelevant in case of a point location operation.

After a model fitting operation, a number of points have been fitted along the model. Among them, some are not reliable because of their Area value. Among the remaining ones, some are filtered out (NumFilteringPasses, FilteringThreshold).

◆ NumSkipRanges

uint eVision.EBaseGauge.NumSkipRanges
get

Number of skip ranges in the gauge after a call to EBaseGauge.AddSkipRange.

◆ NumValidSamples

uint eVision.EBaseGauge.NumValidSamples
get

Number of valid sample points remaining after a model fitting operation.

Irrelevant in case of a point location operation.

After a model fitting operation, a number of points have been fitted along the model. Among them, some are not reliable because of their Area value. Among the remaining ones, some are filtered out (NumFilteringPasses, FilteringThreshold).

◆ RectangularSamplingArea

bool eVision.EBaseGauge.RectangularSamplingArea
getsetabstract

Flag indicating whether the sampling area remains a rectangle when rotated, instead of becoming a parallelogram.

By default, this flag is set to true: the sampling area always remains a rectangle. Setting this property is only useful when the thickness transition parameter is greater than 1. In fact, when thickness transition parameter is equal to 1, rectangle and parallelogram reduce to the same segment.

◆ SamplePointIndex

uint eVision.EBaseGauge.SamplePointIndex
getset

Sampled.

◆ SamplingStep

float eVision.EBaseGauge.SamplingStep
getset

Approximate distance between sampled points during a model fitting operation.

Irrelevant in case of a point gauge.

To fit a model, a series of point location operations are performed along the model. The point location gauges spacing is given by the sampling step.

By default, the sampling step is set to 5, which means 5 pixels when the field of view is not calibrated, and 5 physical units in case of a calibrated field of view.

Be aware that if the sampling step is too large, the number of sampled points along the model will not be sufficient to accurately locate it.

◆ Smoothing

uint eVision.EBaseGauge.Smoothing
getsetabstract

Number of pixels used for the low-pass filtering operation.

To reduce the effect of noise, the profile data can be low-pass filtered along the point location gauge direction.

◆ Thickness

uint eVision.EBaseGauge.Thickness
getsetabstract

Number of parallel segments used to extract the data profile.

To reduce the effect of noise and/or strengthen a transition, several parallel profiles can be accumulated.

◆ Threshold

uint eVision.EBaseGauge.Threshold
getsetabstract

Threshold level used to delimit significant peaks in the data profile.

When analyzing a derivative profile, a peak is made up of consecutive pixel values above Threshold. To detect weak [strong] transitions, lower [raise] the Threshold value.

To avoid interference of noise, an additional parameter is provided. The MinAmplitude parameter is an offset added to Threshold when a peak is to be detected.

When the pixel values of the derivative profile do not reach Threshold + MinAmplitude, the peak is not taken into account. Anyway, when a peak is taken into account, all the pixels with values above Threshold are considered (for more accuracy). Setting the MinAmplitude value to 0 merely cancels its effect.

◆ Tolerance

float eVision.EBaseGauge.Tolerance
getsetabstract

Half thickness of the model fitting gauge.

By default, the tolerance is 20 (2x10), which means 20 pixels when the field of view is not calibrated, and 20 physical units in case of a calibrated field of view.

The tolerance isn't taken into consideration for the point gauge.

◆ TransitionChoice

eVision.ETransitionChoice eVision.EBaseGauge.TransitionChoice
getsetabstract

Transition choice.

Several peaks may be detected along a point location gauge. This parameter helps to select the desired transition.

In case of ETransitionChoice.ETransitionChoice_NthFromBegin or ETransitionChoice.ETransitionChoice_NthFromEnd transition choice, set EBaseGauge.TransitionIndex to specify the desired transition.

By default, the selected transition corresponds to the one with the largest amplitude (ETransitionChoice.ETransitionChoice_LargestAmplitude).

◆ TransitionIndex

uint eVision.EBaseGauge.TransitionIndex
getsetabstract

Index (from 0 on) of the transition to be retained when the transition choice parameter is set to ETransitionChoice.ETransitionChoice_NthFromBegin or ETransitionChoice.ETransitionChoice_NthFromEnd.

Several peaks may be detected along a point location gauge. This parameter helps to select the desired transition.

By default, the first transition is retained (the index value is 0).

◆ TransitionType

eVision.ETransitionType eVision.EBaseGauge.TransitionType
getsetabstract

Transition type.

The type of transition tells whether it crosses increasing or decreasing gray-level values. This helps discriminate between nearby edges of an object.

By default, the searched transition type is indifferently a black to white or a white to black transition (ETransitionType.ETransitionType_BwOrWb).

◆ Type

eVision.EShapeType eVision.EBaseGauge.Type
getabstract

Shape type.