IC Imaging Control C++

FilterLoader::createFilter Method

FilterLoader::createFilter Method

Creates a frame filter instance.
static smart_com<IFrameFilter> createFilter( const FilterInfo& fi );
static smart_com<IFrameFilter> createFilter( const std::string& filter_name,
                                             const std::string& module = std::string() );
static smart_com<IFrameFilter> createFilter( const std::wstring& filter_name,
                                         const std::wstring& module = std::wstring() );

Parameter Description

FilterInfo structure, describing the filter to create. FilterLoader::getAvailableFrameFilters returns a list of FilterInfo structures, which you can pass to this method.


Name of the frame filter to create.


Path to the module in which the frame filter to be created is implemented.

Return value:

This method returns a smart_com to an IFrameFilter interface of the created frame filter. The pointer is 0, when the filter could not be created.


When a combination of filter_name and module is passed to this method, it will look in the list of available frame filters for a filter matching the specified values.

When the module parameter is omitted, the filter loader create an instance of the first frame filter implementation it finds with a matching name.


The following code creates an instance of the Rotate Flip filter in stdfilters.ftf and sets it as device frame filter:

smart_com<IFrameFilter> pRotFlipFilter = FilterLoader::createFilter( "Rotate Flip" );
grabber.setDeviceFrameFilters( pRotFlipFilter.get() );

See also: FilterLoader, FilterLoader::getAvailableFrameFilters

<< FilterLoader

Get in touch with us

About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us