# Construct View

The VisionPro Deep Learning tools operate on an area of the image called a View. A view in VisionPro Deep Learning is slightly different from an image file. A view can be the entire image, a smaller user defined rectangular area of the image, or the output of a tool, depending on the tool and use. The initial View is constructed after the Region of Interest (ROI) of the first tool has been defined. The ROI is defined by an affine transformation from the original image (position, angle, stretch and skew), and the ROI instructs the tool where it will operate within the image. The process of selecting a View from an image is called Segmentation. The first tool added will use manual Segmentation, in other words, defining the ROI to create the View.

1. The orange outline encompasses the entire image, and the red-dashed rectangle is the ROI that is being defined.

2. The green outline encompasses the View.

### ROI and View Index

Many different ROIs can be generated from a single image file, and so can the views. As many different views can be generated from the same single image file, a view's index works as a unique identifier for each view. To put it simply, if 3 views are generated from the same image file, their indices will be 0, 1, and 2.

For another example, if you use a Red Analyze parent tool (preceding tool) in a tool chain, its child tool can have many views when it uses the parent tool's defect regions as its ROIs by Extract Regions as Individual ROIs feature.

Note: For the more details of tool chain, see .

A Red Analyze - Green Classify Tool Chain

2 Defects on a View (Image File) in the Red Analyze Parent Tool

Set ROI for the Green Classify Child Tool: Extract Regions as Individual ROIs

2 Views are Generated from 1 Image File, One View for One Defect

Tip: View Index is hidden by default in View Browser list mode. To show View Index, select , open Edit Column, enable View Index checkbox and select Apply.

The view index of a view without ROI configured is -1. For example in the case above, if a view in the Red Analyze parent tool has no defect regions, the child tool cannot extract any ROI from this view and thus this view has no ROI and has the view index of -1. In addition, a yellow warning sign is displayed at the end of the Filename when there is no ROI for a view.

If there are tools in a chain, the tools following the first tool will use the result of the preceding tool to select the View dynamically. For example, a Model found by a Blue Locate Tool can be used to crop an area of the image and apply a transform to the ROI so that the following tools all operate within the same orientation and position.