User`s guide

Previewing Data
2-15
Custom Preview
Performing Custom Processing of Previewed Data
When you specify an image object to the preview function (see “Previewing Data in
Custom GUIs” on page 2-13), you can optionally also specify a function that preview
executes every time it receives an image frame.
To use this capability, follow these steps:
1
Create the function you want executed for each image frame, called the update
preview window function. For information about this function, see “Creating the
Update Preview Window Function” on page 2-16.
2
Create an image object.
3
Configure the value of the image object's 'UpdatePreviewWindowFcn' application-
defined data to be a function handle to your update preview window function. For
more information, see “Specifying the Update Preview Function” on page 2-17.
4
Call the preview function, specifying the handle of the image object as an argument.
Note If you specify an update preview window function, in addition to whatever
processing your function performs, it must display the video data in the image object.
You can do this by updating the CData of the image object with the incoming video
frames. For some performance guidelines about updating the data displayed in an image
object, see Technical Solution 1-1B022.