# Using a ViDi Tool with an External Fixture

You can use results from an In-Sight Vision Tool to provide fixture data for ViDi tools. In this scenario, a TrainPatMaxRedLine function is added, and a pattern is trained. A FindPatMaxRedLine function is added to locate the pattern in the image, and extract the fixture data. The ViDi function's External Fixture parameter references the X, Y and Angle data (typically via a Fixture function). Within the ViDi function, in the ViDi Editor, you will set the ViDi tool's ROI to ExternalFixture, and then define the tool's region of interest.

Note: Alternatively, within the ViDi function's property sheet, you can also configure the Region, which will define the ROI of the ViDi tool in the ViDi Editor.

To configure a ViDi function to use an external fixture, perform the following:

1. Locate and define what will be used to generate your fixture data within your images.
2. Add the appropriate Vision Tools to define the fixture data.

3. Add a Fixture function to extract the X, Y and Angle data from the function defining the fixture data.

4. Add a ViDi function.

5. Set the External Fixture parameter as an Absolute Reference to the Fixture function.

6. Launch the ViDi Editor.
7. Add the training and testing images.

8. The ViDi Editor will automatically apply the External Fixture and Region parameter data to the images.

9. Right-click within the image, and from the menu, select Edit ROI.

10. In the tool's Region of Interest toolbar, select External Fixture from the drop-down menu.

11. Configure the Region of Interest graphic within the Image Display Area.

12. Once the ROI graphic has been configured, press the Apply button in the Region of Interest toolbar.

13. This will update all of the images that were added to use the fixtured ROI.

Note:

In the event that an external fixture or ROI fails to properly align an image within the ViDi Editor, an error message, "No Views Extracted" will be displayed in the image.

You can enter the filter syntax view_index = -1 in the Display filter to show all the views that are exhibiting this behavior.

To correct the issue, note the names of the images that are experiencing this issue, then return to the Spreadsheet Editor and adjust the fixture data to account for the fixture failure.