
The ROI filter cuts a region of interest out of the incoming frames. It creates a new output video format.
The ROI filter is loaded by an application using following code:
Dim ROIFilter As FrameFilter Set ROIFilter = ICImagingControl1.FrameFilterCreateString("ROI", "stdfilters.ftf")
The part of the image that is copied to the destination frame is determined by four filter parameters:
The dimensions and the start positions of the region of interest can be specified in the ROI filter's property dialog:

The following source code can be used, if the parameter should be set by an application:
Dim left As Long Dim top As Long Dim height As Long Dim width As Long ' Retrieve the current ROI rectangle. left = ROIFilter.Parameter("Left") top = ROIFilter.Parameter("Top") height = ROIFilter.Parameter("Height") width = ROIFilter.Parameter("Width") ' Set a new ROI. left = 100 top = 50 ' The position of the ROI can be set regardless of whether the live video is running ' because the size of the resulting video format is not changed. ROIFilter.Parameter("Left") = left ROIFilter.Parameter("Top") = top If Not ICImagingControl1.LiveVideoRunning Then ' A new ROI width and height can only be set, while the live video ist stopped. ' Otherwise, an error is returned by setParameter(). height = 120 width = 180 ROIFilter.Parameter("Height") = height ROIFilter.Parameter("Width") = width End If