Select

Selects a part of a bigger image. Implements IImageFilter. See IImageFilter for general information about Filters.

Namespace: Progile.ATE.TestFramework

Constructors

Creates a new Select Filter instance with the Bounds ResultRectangle corresponding to the desired search rectangle.

Select(ResultRectangle, Int32)

Syntax:

public Select(
    ResultRectangle selection,
    int borderSize = 0
);

Parameter

Description

selection

Type: ResultRectangle

The Bounds ResultRectangle corresponding to the desired search rectangle.

[borderSize]

Type: Int32 A margin added to all sides of the selection rectangle. Can be positive or negative. By default 0.

Select(Int32, Int32, Int32, Int32, Int32)

Syntax:

public Select(
    int x, int y, int width, int height,
    int borderSize = 0)

Parameter

Description

x, y, width, heigth

Type: Int32

The coordinates of the rectangle corresponding to the Bounds search rectangle for the select filter. See ctor of Rectangle for details.

[borderSize]

Type: Int32 A margin added to all sides of the selection rectangle. Can be positive or negative. By default 0.

Methods

FromRectangle

Static method to create a new Select Filter instance with the Bounds ResultRectangle corresponding to the desired search rectangle. Identical to Constructor Select(ResultRectangle, Int32).

FromResults

Static method to create a new Select Filter instance with the Bounds ResultRectangle corresponding to the desired search rectangle. The rectangle is formed by the hotspots (Location property) of the two IEngineResults.

Syntax:

public static Select FromResults(
    IEngineResult first,
    IEngineResult second,
    int borderSize = 0
)

Parameter

Description

first

Type: IEngineResult

The result corresponding to one corner of the desired search rectangle.

second

Type: IEngineResult

The result corresponding to the opposite corner of the desired search rectangle.

[borderSize]

Type: Int32 A margin added to all sides of the selection rectangle. Can be positive or negative. By default 0.

FromXY

Static method to create a new Select Filter instance with the Bounds ResultRectangle corresponding to the desired search rectangle. Identical to Constructor Select(Int32, Int32, Int32, Int32, Int32).

Apply

Applies the filter to the input image. Used internally.

Reverse

Transforms the coordinates of a ResultRectangle (produced by an image search with this filter applied) back to the original reference frame of the screen of the current SUT. Used internally.

Properties

Bounds

The ResultRectangle corresponding to the search rectangle.

Syntax: public ResultRectangle Bounds { get; }

Name

The name of the filter type, i.e. "SELECT".

Syntax: public string Name => "SELECT";

Last updated