Grabber::setDisplayFrameFilters Method

Inserts a list of frame filters in the display path of the image stream. If an overlay is present in the display path, the filter list is inserted in front of it. This means that the overlay is located between the filter list and the display. If there is no overlay in the display path, the filter list is inserted in front of the the display.
Syntax:
bool setDisplayFrameFilters( IFrameFilter* pFilter );
bool setDisplayFrameFilters( const tFrameFilterList& filterList );

Parameter Description
pFilter

Pointer to an IFrameFilter object. If this parameter is used, a filter list is generated and the IFrameFilter object is inserted.

filterList

A tFrameFilterList, containing pointers to IFrameFilter objects.

Return value:

true, if the operation was successful. If an error occurred, call getLastError to obtain extended error information.

Remarks:

The life time of filter instances has to be checked by the caller of this method. Therefore, the caller remains responsible for the filter objects that are referenced by the plain pointers in the filter list. If you want to use filters here that have been loaded from a module, you have to call the get method of the smart_com pointer that holds the filter instance in order to obtain a plain pointer. Filters that have been inserted in the display path must not be destroyed unless they have been removed by calling setDisplayFrameFilters using a null pointer as a parameter.

Information:

Introduced in version 3.0

Sample:

The following code fragment shows how to create two frame filter instances and set them as a filter chain.

m_pROIFilter = FilterLoader::createFilter( "ROI" );
m_pRotFlipFilter = FilterLoader::createFilter( "Rotate Flip" );
// Set filter parameters.
tFrameFilterList filterList;
// Use .get to extract a plain pointer from the smart pointer.
filterList.push_back( m_pROIFilter.get() );
filterList.push_back( m_pRotFlipFilter.get() );
m_Grabber.setDisplayFrameFilters( filterList );

Please note the use of smart_com.get() to extract a plain pointer out of the smart pointers.

See also: Grabber, IFrameFilter, Grabber::getDisplayFrameFilters, Grabber::setDeviceFrameFilters

<< Grabber