Skip to content

set_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_paramT_set_image_source_param🔗

Short description🔗

set_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_paramT_set_image_source_param — Set a parameter of an image source.

Signature🔗

set_image_source_param( image_source ImageSourceHandle, string Param, attribute.name GenParamName, attribute.value GenParamValue, string Value )void SetImageSourceParam( const HTuple& ImageSourceHandle, const HTuple& Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value )static void HOperatorSet.SetImageSourceParam( HTuple imageSourceHandle, HTuple param, HTuple genParamName, HTuple genParamValue, HTuple value )def set_image_source_param( image_source_handle: HHandle, param: str, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[int, float, str]], value: Sequence[Union[str, float, int]] ) -> None

Herror T_set_image_source_param( const Htuple ImageSourceHandle, const Htuple Param, const Htuple GenParamName, const Htuple GenParamValue, const Htuple Value )

void HImageSource::SetImageSourceParam( const HString& Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value ) const

void HImageSource::SetImageSourceParam( const char* Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value ) const

void HImageSource::SetImageSourceParam( const wchar_t* Param, const HTuple& GenParamName, const HTuple& GenParamValue, const HTuple& Value ) const (Windows only)

void HImageSource.SetImageSourceParam( string param, HTuple genParamName, HTuple genParamValue, HTuple value )

Description🔗

The operator set_image_source_paramSetImageSourceParam sets the parameter values for an image source handle ImageSourceHandleimageSourceHandleimage_source_handle to Valuevaluevalue.

For further information about the image source concept see Image Source.

The parameter needs to be specified using Paramparamparam. The parameter group can be specified using the generic parameters. You have the following options for GenParamNamegenParamNamegen_param_name:

  • 'group'"group" Specify the parameter group the parameter is found in with GenParamValuegenParamValuegen_param_value by setting one of these options:

    • 'image_source'"image_source",

    • 'plugin'"plugin",

    • 'interface'"interface",

    • 'local_device'"local_device",

    • 'device'"device",

    • 'stream'"stream".

    When setting no generic parameters, GenParamNamegenParamNamegen_param_name = 'group'"group" and GenParamValuegenParamValuegen_param_value = 'device'"device" are assumed by default.

  • 'command_wait'"command_wait" Wait for the end of the command execution (blocking operation).

    List of values: 'false'"false", 'true'"true"

    Default: 'true'"true"

    Restriction: Only valid for a Paramparamparam of type 'command'"command".

  • 'command_wait_interval'"command_wait_interval" Polling interval in [ms] to check if the command execution finished.

    Default: 100100

    Restriction: Only valid for a Paramparamparam of type 'command'"command".

  • 'command_wait_timeout'"command_wait_timeout" Time in [ms] to wait for end of the command execution.

    Default: 50005000

    Restriction: Only valid for a Paramparamparam of type 'command'"command".

It depends on the image source and its state, which parameters Paramparamparam can be set. While some parameters are specific to the hardware or software manufacturer and some depend on whether the image source is in a connected state or not, the parameters of the 'image_source'"image_source" group are always available. The following list gives an overview, which of those parameters can be set using set_image_source_paramSetImageSourceParam. A description of the parameters can be found in get_image_source_paramGetImageSourceParam.

  • 'device_access_flags'"device_access_flags"

  • 'device_id'"device_id"

  • 'device_query_timeout'"device_query_timeout"

  • 'device_user_name'"device_user_name"

  • 'device_serial_number'"device_serial_number"

  • 'fetch_timeout'"fetch_timeout"

  • 'interface_id'"interface_id"

  • 'interface_query_timeout'"interface_query_timeout"

  • 'num_buffers'"num_buffers"

  • 'plugin_name'"plugin_name"

  • 'plugin_path'"plugin_path"

  • 'stream_id'"stream_id"

For plugins provided by MVTec, the MVTec Interfaces Reference Documentation describes all plugin-specific parameters.

Paramparamparam is used to determine the desired parameter. The value, the parameter should be set to is passed in Valuevaluevalue. Parameters of type 'command'"command" can be executed by setting Valuevaluevalue to 'execute'"execute".

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

ImageSourceHandleimageSourceHandleimage_source_handle (input_control) image_source → (handle)HTuple (HHandle)HImageSource, HTuple (IntPtr)HHandleHtuple (handle)

Image source handle.

Paramparamparam (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Parameter whose value is to be set.

GenParamNamegenParamNamegen_param_name (input_control) attribute.name-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Generic parameter name.

Default: [][]
Suggested values: 'group', 'command_wait', 'command_wait_timeout', 'command_wait_interval'"group", "command_wait", "command_wait_timeout", "command_wait_interval"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value-array → (integer / real / string)HTuple (Hlong / double / HString)HTuple (int / long / double / string)Sequence[Union[int, float, str]]Htuple (Hlong / double / char*)

Generic parameter value.

Default: [][]
Suggested values: 'image_source', 'plugin', 'interface', 'local_device', 'device', 'stream', 1, 5000, 100"image_source", "plugin", "interface", "local_device", "device", "stream", 1, 5000, 100

Valuevaluevalue (input_control) string-array → (string / real / integer)HTuple (HString / double / Hlong)HTuple (string / double / int / long)Sequence[Union[str, float, int]]Htuple (char* / double / Hlong)

Value to be set.

Example🔗

(HDevelop)

* Configure or change the 'device_id' of the ImageSource (before the connect).
set_image_source_param (ImageSourceHandle,'device_id', 'group', 'image_source', '<desired_device_id>')
* Configure the ExposureTime of the connected camera (notice per default 'group'='device').
set_image_source_param (ImageSourceHandle, 'ExposureTime', [], [], 50000)
* Execute a software trigger (notice per default 'group'='device') without waiting for the end of the execution.
set_image_source_param (ImageSourceHandle, 'TriggerSoftware', 'command_wait', 0,'execute')
* Configure the handling of image buffers in the stream module.
set_image_source_param (ImageSourceHandle, 'StreamBufferHandlingMode', 'group', 'stream', 'NewestOnly')

Result🔗

If the parameter values are correct, set_image_source_paramSetImageSourceParam returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

query_image_sourcesQueryImageSources, create_image_sourceCreateImageSource, connect_image_sourceConnectImageSource

Possible successors

get_image_source_paramGetImageSourceParam, disconnect_image_sourceDisconnectImageSource

See also

get_image_source_paramGetImageSourceParam

Module🔗

Foundation