# SegmentFromLines

Computes a new line segment by averaging two input lines. The 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. averages the first endpoint of the first line with the first endpoint of the second line. Similarly, it averages the second endpoint of the first line with the second endpoint of the second line. The result is a mean line segment.

Inputs

Parameter | Description
Line 0 | Specifies the coordinates of the first line.
X 0 | The X coordinate of the first endpoint of the first line.
Y 0 | The Y coordinate of the first endpoint of the first line.
X 1 | The X coordinate of the second endpoint of the first line.
Y 1 | The Y coordinate of the second endpoint of the first line.
Line 1 | Specifies the coordinates of the second line.
X 0 | The X coordinate of the first endpoint of the second line.
Y 0 | The Y coordinate of the first endpoint of the second line.
X 1 | The X coordinate of the second endpoint of the second line.
Y 1 | The Y coordinate of the second endpoint of the second line.
Show | Specifies which graphical overlays are displayed on top of the image.
0 = hide all | The available graphics items are hidden except when the cell containing the function is the active cell in the spreadsheet.
1 = result graphics only | The graphics items associated with the returned data structure are displayed at all times. Other graphics items are only displayed when the function is the active cell in the spreadsheet.
2 = input and result graphics | The graphics items associated with the returned data structure and input image region are displayed at all times.

Outputs

Returns | A Line data structure containing the mean line segment.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

Vision Data Access functions

The following Structures Vision Data Access functions are automatically inserted into the spreadsheet to create the result table:

Label | Function | Description
--- | --- | ---
X0 | GetX(Line, 0) | The X coordinate of the first endpoint.
Y0 | GetY(Line, 0) | The Y coordinate of the first endpoint.
X1 | GetX(Line, 1) | The X coordinate of the second endpoint.
Y1 | GetY(Line, 1) | The Y coordinate of the second endpoint.