IC Imaging Control .NET

FrameFilterImpl.AddIntParam Method

FrameFilterImpl.AddIntParam Method

Registers a integer parameter than can be accessed using the methods of FrameFilter.
Syntax:
public delegate void SetIntParam( int value );
public delegate int GetIntParam();
 
protected void AddIntParam( string name, SetIntParam setFunc, GetIntParam getFunc );
Name Description
name

Name of the parameter. This string has to be passed to FrameFilter.SetIntParameter or FrameFilter.GetIntParameter to access the parameter.

getFunc

GetIntParam delegates responsible to return the current state of the parameter.

setFunc

SetIntParam delegates responsible to receive and handle changes of the parameter.

Remarks:

All parameters of a frame filter should be registered in its constructor.

Example:

The following sample code shows how to add two parameters. One is named "enable" and the other one, which is an int parameter is named "threshold":

[C#]
public BinarizationFilter() { AddBoolParam("enable", new SetBoolParam(setEnable), new GetBoolParam(getEnable)); AddIntParam("threshold", new SetIntParam(setThreshold), new GetIntParam(getThreshold)); }

The functions, that are referenced in AddIntParam to set the integer parameter are implemeted as follows:

[C#]
void setThreshold(int threshold) { m_threshold = threshold; }
[C#]
int getThreshold() { return m_threshold; }
See also: FrameFilterImpl, FrameFilterImpl.AddBoolParam, FrameFilterImpl.AddFloatParam, FrameFilterImpl.AddStringParam, FrameFilterImpl.AddDataParam

<< FrameFilterImpl

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