Operator Reference

get_image_source_paramT_get_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param (Operator)

get_image_source_paramT_get_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param — Return the value of an image source parameter.

Signature

get_image_source_param( : : ImageSourceHandle, Param, GenParamName, GenParamValue : Value)

Herror T_get_image_source_param(const Htuple ImageSourceHandle, const Htuple Param, const Htuple GenParamName, const Htuple GenParamValue, Htuple* Value)

void GetImageSourceParam(const HTuple& ImageSourceHandle, const HTuple& Param, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Value)

HTuple HImageSource::GetImageSourceParam(const HString& Param, const HTuple& GenParamName, const HTuple& GenParamValue) const

HTuple HImageSource::GetImageSourceParam(const char* Param, const HTuple& GenParamName, const HTuple& GenParamValue) const

HTuple HImageSource::GetImageSourceParam(const wchar_t* Param, const HTuple& GenParamName, const HTuple& GenParamValue) const   ( Windows only)

def get_image_source_param(image_source_handle: HHandle, param: str, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[int, float, str]]) -> Sequence[HTupleElementType]

Description

The operator get_image_source_paramget_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param returns the parameter values or parameter properties for an image source handle ImageSourceHandleImageSourceHandleImageSourceHandleimageSourceHandleimage_source_handle in ValueValueValuevaluevalue.

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

The parameter needs to be specified using ParamParamParamparamparam. The parameter group can be specified using the generic parameters. There are two types of information to be retrieved from the parameter ParamParamParamparamparam. Use the generic parameter GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name to differentiate whether you want to get the value or meta information regarding the parameter. You have the following options for GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name:

'group'"group""group""group""group"

Specify the parameter group the parameter is found in with GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value by setting one of these options:

  • 'image_source'"image_source""image_source""image_source""image_source",

  • 'plugin'"plugin""plugin""plugin""plugin",

  • 'interface'"interface""interface""interface""interface",

  • 'local_device'"local_device""local_device""local_device""local_device",

  • 'device'"device""device""device""device",

  • 'stream'"stream""stream""stream""stream".

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

The group 'image_source'"image_source""image_source""image_source""image_source" is always available, whereas a connection is needed for the other parameter groups.

'property'"property""property""property""property"

Retrieve meta information about ParamParamParamparamparam. Specify the requested parameter property with GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value by setting one of these options:

  • 'access'"access""access""access""access": Provides access permissions as a string.

    List of values: 'na'"na""na""na""na" ((currently) not available), 'ro'"ro""ro""ro""ro" (read-only), 'rw'"rw""rw""rw""rw" (read/write), 'wo'"wo""wo""wo""wo" (write-only).

  • 'description'"description""description""description""description": Provides a description of the parameter as a string.

  • 'display_name'"display_name""display_name""display_name""display_name": Provides the display name of the parameter as a string.

  • 'increment'"increment""increment""increment""increment": Provides the step width of the parameter as a real or integer value, depending on the data type of the parameter.

  • 'max'"max""max""max""max": Provides the maximum value of the parameter as a real or integer value, depending on the data type of the parameter.

  • 'min'"min""min""min""min": Provides the minimum value of the parameter as a real or integer value, depending on the data type of the parameter.

  • 'persistable'"persistable""persistable""persistable""persistable": Provides information about the persistence of the parameter as an integer.

    List of values: 0 (false), 1 (true).

  • 'tooltip'"tooltip""tooltip""tooltip""tooltip": Provides a short description of the parameter.

  • 'type'"type""type""type""type": Provides the parameter type as a string.

    List of values: 'boolean'"boolean""boolean""boolean""boolean", 'command'"command""command""command""command", 'enumeration'"enumeration""enumeration""enumeration""enumeration" (string out of a list of allowed strings), 'integer'"integer""integer""integer""integer", 'real'"real""real""real""real", 'register'"register""register""register""register", 'string'"string""string""string""string".

  • 'values'"values""values""values""values": Provides a list of all allowed values for parameters of 'type'"type""type""type""type" = 'enumeration'"enumeration""enumeration""enumeration""enumeration" and for some of 'type'"type""type""type""type" 'integer'"integer""integer""integer""integer" and 'real'"real""real""real""real".

  • 'visibility'"visibility""visibility""visibility""visibility": Provides information about the visibility of the parameter.

    List of values: 'basic'"basic""basic""basic""basic", 'advanced'"advanced""advanced""advanced""advanced", 'all'"all""all""all""all".

Image Source Handle Parameters

It depends on the image source and its state, which parameters ParamParamParamparamparam can be retrieved. 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""image_source""image_source""image_source" group are always available. The following table gives an overview, which of those parameters can be set using set_image_source_paramset_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param and which can be retrieved using get_image_source_paramget_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param. A description of the parameters can be found below the table.

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name set get
'device_access_flags'"device_access_flags""device_access_flags""device_access_flags""device_access_flags" x x
'device_access_status'"device_access_status""device_access_status""device_access_status""device_access_status" x
'device_connect_mode'"device_connect_mode""device_connect_mode""device_connect_mode""device_connect_mode" x
'device_id'"device_id""device_id""device_id""device_id" x x
'device_is_connected'"device_is_connected""device_is_connected""device_is_connected""device_is_connected" x
'device_query_timeout'"device_query_timeout""device_query_timeout""device_query_timeout""device_query_timeout" x x
'device_user_name'"device_user_name""device_user_name""device_user_name""device_user_name" x x
'device_serial_number'"device_serial_number""device_serial_number""device_serial_number""device_serial_number" x x
'fetch_timeout'"fetch_timeout""fetch_timeout""fetch_timeout""fetch_timeout" x x
'interface_connect_mode'"interface_connect_mode""interface_connect_mode""interface_connect_mode""interface_connect_mode" x
'interface_display_name'"interface_display_name""interface_display_name""interface_display_name""interface_display_name" x
'interface_id'"interface_id""interface_id""interface_id""interface_id" x x
'interface_is_connected'"interface_is_connected""interface_is_connected""interface_is_connected""interface_is_connected" x
'interface_query_timeout'"interface_query_timeout""interface_query_timeout""interface_query_timeout""interface_query_timeout" x x
'num_buffers'"num_buffers""num_buffers""num_buffers""num_buffers" x x
'plugin_connect_mode'"plugin_connect_mode""plugin_connect_mode""plugin_connect_mode""plugin_connect_mode" x
'plugin_is_connected'"plugin_is_connected""plugin_is_connected""plugin_is_connected""plugin_is_connected" x
'plugin_name'"plugin_name""plugin_name""plugin_name""plugin_name" x x
'plugin_path'"plugin_path""plugin_path""plugin_path""plugin_path" x x
'stream_connect_mode'"stream_connect_mode""stream_connect_mode""stream_connect_mode""stream_connect_mode" x
'stream_id'"stream_id""stream_id""stream_id""stream_id" x x
'stream_is_connected'"stream_is_connected""stream_is_connected""stream_is_connected""stream_is_connected" x
'stream_state'"stream_state""stream_state""stream_state""stream_state" x
'version'"version""version""version""version" x
'device_access_flags'"device_access_flags""device_access_flags""device_access_flags""device_access_flags"

GenTL access flags used when attempting to connect to the device.

  • 'control'"control""control""control""control": Open the device in a way that other hosts/processes can have read-only access to the device. Device access level is read/write for this process.

  • 'exclusive'"exclusive""exclusive""exclusive""exclusive": Open the device in a way that only this host/process can have access to the device. Device access level is read/write for this process.

  • 'none'"none""none""none""none": Either the device is not open because it was not opened before or the access to it was denied.

  • 'read_only'"read_only""read_only""read_only""read_only": Open the device read-only. All port functions can only read from the device.

  • 'unknown'"unknown""unknown""unknown""unknown": Not used in a command. Can be used to initialize a variable to query that information.

'device_access_status'"device_access_status""device_access_status""device_access_status""device_access_status"

Current GenTL access status of the device.

  • 'busy'"busy""busy""busy""busy": Device has already been opened in 'exclusive'"exclusive""exclusive""exclusive""exclusive" mode by another process/host.

  • 'open_read_only'"open_read_only""open_read_only""open_read_only""open_read_only": Device has already been opened by this process. Connection is set up in read-only mode, a different application has the 'control'"control""control""control""control" mode (see 'device_access_flags'"device_access_flags""device_access_flags""device_access_flags""device_access_flags").

  • 'open_read_write'"open_read_write""open_read_write""open_read_write""open_read_write": Device has already been opened by this process and handled in 'exclusive'"exclusive""exclusive""exclusive""exclusive" or 'control'"control""control""control""control" mode (see 'device_access_flags'"device_access_flags""device_access_flags""device_access_flags""device_access_flags").

  • 'no_access'"no_access""no_access""no_access""no_access": Device is not accessible (no connection possible).

  • 'read_only'"read_only""read_only""read_only""read_only": Device is available for read-only access.

  • 'read_write'"read_write""read_write""read_write""read_write": Device is available for read/write access (see 'device_access_flags'"device_access_flags""device_access_flags""device_access_flags""device_access_flags").

  • 'unknown'"unknown""unknown""unknown""unknown": Device accessibility is not known.

'device_connect_mode'"device_connect_mode""device_connect_mode""device_connect_mode""device_connect_mode"

Connect mode for the device module.

  • 'automatic'"automatic""automatic""automatic""automatic": No identifier is provided, the required module will be automatically found and connected.

  • 'exact'"exact""exact""exact""exact": A module identifier has been indicated for the module connection.

  • 'none'"none""none""none""none": Module connection not needed.

'device_id'"device_id""device_id""device_id""device_id"

ID of the device as a string. It can be used to specify the device module to open during connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source.

'device_is_connected'"device_is_connected""device_is_connected""device_is_connected""device_is_connected"

Connection status of the device as an integer.

List of values: 0 (unconnected), 1 (connected).

'device_query_timeout'"device_query_timeout""device_query_timeout""device_query_timeout""device_query_timeout"

Desired timeout [ms] for aborting a pending device query. Is used as the device discovery timeout in GigEVision transport layers. If -1 is specified, the timeout is set to infinite.

Default: 1100

'device_serial_number'"device_serial_number""device_serial_number""device_serial_number""device_serial_number"

Serial number of the device as a string. It can be used to specify which device to connect to when preferring not to use 'device_id'"device_id""device_id""device_id""device_id".

'device_user_name'"device_user_name""device_user_name""device_user_name""device_user_name"

User name of the device as a string. It can be used to specify which device to connect to when preferring not to use 'device_id'"device_id""device_id""device_id""device_id".

'fetch_timeout'"fetch_timeout""fetch_timeout""fetch_timeout""fetch_timeout"

Desired timeout [ms] for aborting a pending grab. If -1 is specified, the timeout is set to infinite.

Default: 5000

'interface_connect_mode'"interface_connect_mode""interface_connect_mode""interface_connect_mode""interface_connect_mode"

Connect mode for the interface module.

  • 'automatic'"automatic""automatic""automatic""automatic": No identifier is provided, the required module will be automatically found and connected.

  • 'exact'"exact""exact""exact""exact": A module identifier has been indicated for the module connection.

  • 'none'"none""none""none""none": Module connection not needed.

'interface_display_name'"interface_display_name""interface_display_name""interface_display_name""interface_display_name"

Provides a human-readable secondary identifier for the interface module as a string.

'interface_id'"interface_id""interface_id""interface_id""interface_id"

ID of the interface as a string. It can be used to specify the interface module to open during connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source.

'interface_is_connected'"interface_is_connected""interface_is_connected""interface_is_connected""interface_is_connected"

Connection status of the interface as an integer.

List of values: 0 (unconnected), 1 (connected).

'interface_query_timeout'"interface_query_timeout""interface_query_timeout""interface_query_timeout""interface_query_timeout"

Desired timeout [ms] for aborting a pending interface query. If -1 is specified, the timeout is set to infinite.

Default: 1100

'num_buffers'"num_buffers""num_buffers""num_buffers""num_buffers"

Number of buffers that will be prepared by start_image_sourcestart_image_sourceStartImageSourceStartImageSourcestart_image_source for receiving images. A larger number of buffers can help preventing image loss in short peak loads of the host system. The number of buffers can only be changed before starting the acquisition with start_image_sourcestart_image_sourceStartImageSourceStartImageSourcestart_image_source.

Default: 4

'plugin_connect_mode'"plugin_connect_mode""plugin_connect_mode""plugin_connect_mode""plugin_connect_mode"

Connect mode for the plugin module.

  • 'automatic'"automatic""automatic""automatic""automatic": No identifier is provided, the required module will be automatically found and connected.

  • 'exact'"exact""exact""exact""exact": A module identifier has been indicated for the module connection.

  • 'none'"none""none""none""none": Module connection not needed.

'plugin_is_connected'"plugin_is_connected""plugin_is_connected""plugin_is_connected""plugin_is_connected"

Connection status of the plugin as an integer.

List of values: 0 (unconnected), 1 (connected).

'plugin_name'"plugin_name""plugin_name""plugin_name""plugin_name"

Name of the plugin as a string.

'plugin_path'"plugin_path""plugin_path""plugin_path""plugin_path"

Path to the .cti plugin file. Can be used to specify the plugin file even when the GenTL environment variables to detect plugins do not contain the location of the desired plugin file.

'stream_connect_mode'"stream_connect_mode""stream_connect_mode""stream_connect_mode""stream_connect_mode"

Connect mode for the stream module.

  • 'automatic'"automatic""automatic""automatic""automatic": No identifier is provided, the required module will be automatically found and connected.

  • 'exact'"exact""exact""exact""exact": A module identifier has been indicated for the module connection.

  • 'none'"none""none""none""none": Module connection not needed.

'stream_id'"stream_id""stream_id""stream_id""stream_id"

ID of the stream as a string. Can be used to specify the stream module to open during connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source.

'stream_is_connected'"stream_is_connected""stream_is_connected""stream_is_connected""stream_is_connected"

Connection status of the stream as an integer.

List of values: 0 (unconnected), 1 (connected).

'stream_state'"stream_state""stream_state""stream_state""stream_state"

Current state of the stream.

  • 'initialized'"initialized""initialized""initialized""initialized": Stream is initialized but not running.

  • 'running'"running""running""running""running": Stream is currently running. This means resources like threads and buffers are allocated in order to receive images. Depending on the device configuration, images are constantly transmitted in the background in this state.

'version'"version""version""version""version"

Version of the image source library.

For further parameters, check the documentation of the respective software or hardware manufacturer.

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

ImageSourceHandleImageSourceHandleImageSourceHandleimageSourceHandleimage_source_handle (input_control)  image_source HImageSource, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Image source handle.

ParamParamParamparamparam (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Parameter to be retrieved.

GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Generic parameter name.

Default: []

Suggested values: 'group'"group""group""group""group", 'property'"property""property""property""property"

GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.value-array HTupleSequence[Union[int, float, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Generic parameter value.

Default: []

Suggested values: 'image_source'"image_source""image_source""image_source""image_source", 'plugin'"plugin""plugin""plugin""plugin", 'interface'"interface""interface""interface""interface", 'local_device'"local_device""local_device""local_device""local_device", 'device'"device""device""device""device", 'stream'"stream""stream""stream""stream", 'tooltip'"tooltip""tooltip""tooltip""tooltip", 'description'"description""description""description""description", 'display_name'"display_name""display_name""display_name""display_name", 'visibility'"visibility""visibility""visibility""visibility", 'access'"access""access""access""access", 'type'"type""type""type""type", 'persistable'"persistable""persistable""persistable""persistable", 'min'"min""min""min""min", 'max'"max""max""max""max", 'increment'"increment""increment""increment""increment", 'values'"values""values""values""values"

ValueValueValuevaluevalue (output_control)  string-array HTupleSequence[HTupleElementType]HTupleHtuple (string / real / integer / handle) (string / double / int / long / HHandle) (HString / double / Hlong / HHandle) (char* / double / Hlong / handle)

Retrieved value.

Example (HDevelop)

* Get current selected pixel format (notice per default 'group'='device').
get_image_source_param (ImageSourceHandle, 'PixelFormat', [], [], PixelFormat)
* Get list of supported pixel formats by the device.
get_image_source_param (ImageSourceHandle, 'PixelFormat', 'property', 'values', AvailablePixelFormats)
* Get the version information of the plugin.
get_image_source_param (ImageSourceHandle, 'TLVersion', 'group', 'plugin', Version)

Result

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

Possible Predecessors

query_image_sourcesquery_image_sourcesQueryImageSourcesQueryImageSourcesquery_image_sources, create_image_sourcecreate_image_sourceCreateImageSourceCreateImageSourcecreate_image_source, connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source

Possible Successors

set_image_source_paramset_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param, disconnect_image_sourcedisconnect_image_sourceDisconnectImageSourceDisconnectImageSourcedisconnect_image_source

See also

set_image_source_paramset_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param

Module

Foundation