IFrameFilter::setParameter Method |
||||||||||||||||||||||||||
Sets a frame filter parameter. | ||||||||||||||||||||||||||
Syntax: | tFilterError setParameter( const std::string& name, const _variant_t& value ); tFilterError setParameter( const std::string& name, const std::string& value ); tFilterError setParameter( const std::string& name, int value ); tFilterError setParameter( const std::string& name, long value ); tFilterError setParameter( const std::string& name, float value ); tFilterError setParameter( const std::string& name, bool value ); tFilterError setParameter( const std::wstring& name, const _variant_t& value ); tFilterError setParameter( const std::wstring& name, const std::wstring& value ); tFilterError setParameter( const std::wstring& name, int value ); tFilterError setParameter( const std::wstring& name, long value ); tFilterError setParameter( const std::wstring& name, float value ); tFilterError setParameter( const std::wstring& name, bool value ); |
|||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Return Value: | A member of the tFilterError enumeration:
|
|||||||||||||||||||||||||
Remarks: | All calls to setParameter have to be inside a beginParamTransfer /endParamTransfer block. Especially when setting multiple parameters, like X/Y-coordinates, this is important to ensure parameter consistency. |
|||||||||||||||||||||||||
Example: | The following example shows how to set the parameters of a frame filter. Assume a frame filter was loaded and set with the following code: smart_com<IFrameFilter> pRotFlipFilter = FilterLoader::createFilter( "Rotate Flip" ); grabber.setDeviceFrameFilters( pRotFlipFilter.get() ); The parameters are set using beginParamTransfer, setParameter and endParamTransfer: pRotFlipFilter->beginParamTransfer(); if( eNO_ERROR != pRotFlipFilter->setParameter( "Rotation Angle", 90 ) ) { std::cerr << "Error setting parameter 'Rotation Angle'" << std::endl; } if( eNO_ERROR != pRotFlipFilter->setParameter( "Flip H", false ) ) { std::cerr << "Error setting parameter 'Flip H'" << std::endl; } if( eNO_ERROR != pRotFlipFilter->setParameter( "Flip V", true ) ) { std::cerr << "Error setting parameter 'Flip V'" << std::endl; } pRotFlipFilter->endParamTransfer(); |
|||||||||||||||||||||||||
See also: | IFrameFilter, IFrameFilter::getParameter, IFrameFilter::getAvailableParameters, IFrameFilter::beginParamTransfer, IFrameFilter::endParamTransfer |