query_image_sourcesT_query_image_sourcesQueryImageSourcesQueryImageSourcesquery_image_sources (Operator)
Name
query_image_sourcesT_query_image_sourcesQueryImageSourcesQueryImageSourcesquery_image_sources — Returns handles corresponding to image sources.
Signature
Description
According to the query specified by the plugin name and the input generic
parameters, query_image_sourcesquery_image_sourcesQueryImageSourcesQueryImageSourcesquery_image_sources returns the corresponding handles in
ImageSourceHandlesImageSourceHandlesImageSourceHandlesimageSourceHandlesimage_source_handles. The queried handles are in an unconnected state.
You can retrieve image source handles of the different image source modules:
-
plugins,
-
interfaces,
-
devices and
-
streams.
These modules are structured in a hierarchical parent-child
configuration, with each module acting as a parent to the subsequent one.
For further information about the image source concept see
Image Source.
To restrict the query to a specific plugin its name can be specified in
PluginNamePluginNamePluginNamepluginNameplugin_name. Set 'all'"all""all""all""all" to query all available plugins
at the same time.
When using GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value to query
information on a specific plugin or interface handle, set PluginNamePluginNamePluginNamepluginNameplugin_name
to 'ignore'"ignore""ignore""ignore""ignore".
List of values:
'all'"all""all""all""all", 'ignore'"ignore""ignore""ignore""ignore", '<plugin_name>'"<plugin_name>""<plugin_name>""<plugin_name>""<plugin_name>".
Default:
'all'"all""all""all""all".
The generic parameters GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
are used to specify the scope of the query. The supported
GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name are:
- 'query'"query""query""query""query":
-
Query handles from available image sources.
The options for GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value are:
- 'plugins'"plugins""plugins""plugins""plugins":
For each available plugin, a handle is
returned.
- 'interfaces'"interfaces""interfaces""interfaces""interfaces":
For each available interface, a handle
is returned, corresponding to the interface and its respective plugin
module.
- 'devices'"devices""devices""devices""devices":
For each available device, a handle
is returned, corresponding to the device and its respective interface
and plugin module.
- 'streams'"streams""streams""streams""streams":
-
For each available stream in a given device, a
handle is returned, corresponding to the stream and its respective device,
interface and plugin module.
PluginNamePluginNamePluginNamepluginNameplugin_name must be set to 'ignore'"ignore""ignore""ignore""ignore".
Note: Along with the generic parameter pair 'query'"query""query""query""query" and
'streams'"streams""streams""streams""streams", you need to provide the parameter
'device_handle'"device_handle""device_handle""device_handle""device_handle" and a device handle:
query_image_sources('ignore', ['query', 'device_handle'] , ['streams', DeviceHandle], QueriedStreams)query_image_sources("ignore", ["query", "device_handle"] , ["streams", DeviceHandle], QueriedStreams)QueryImageSources("ignore", ["query", "device_handle"] , ["streams", DeviceHandle], QueriedStreams)QueryImageSources("ignore", ["query", "device_handle"] , ["streams", DeviceHandle], QueriedStreams)query_image_sources("ignore", ["query", "device_handle"] , ["streams", DeviceHandle], QueriedStreams)
- 'plugin_handle'"plugin_handle""plugin_handle""plugin_handle""plugin_handle":
-
Specify a connected plugin handle in GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
from which to query for all interface or device handles.
See connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source for information about connecting
to an image source. PluginNamePluginNamePluginNamepluginNameplugin_name must be set to 'ignore'"ignore""ignore""ignore""ignore".
- 'interface_handle'"interface_handle""interface_handle""interface_handle""interface_handle":
-
Specify a connected interface handle in GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
from which to query for device handles.
See connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source for information about connecting
to an image source. PluginNamePluginNamePluginNamepluginNameplugin_name must be set to 'ignore'"ignore""ignore""ignore""ignore".
- 'device_handle'"device_handle""device_handle""device_handle""device_handle":
Specify a connected device handle in GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value
from which to query for stream handles (see the 'query'"query""query""query""query" option
'streams'"streams""streams""streams""streams" above.)
See connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source for information about connecting
to an image source.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
Parameters
PluginNamePluginNamePluginNamepluginNameplugin_name (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Name of an image source plugin.
Default:
'all'
"all"
"all"
"all"
"all"
Suggested values:
'all'"all""all""all""all", 'ignore'"ignore""ignore""ignore""ignore", 'mvtec_gigevision'"mvtec_gigevision""mvtec_gigevision""mvtec_gigevision""mvtec_gigevision", 'mvtec_usb3vision'"mvtec_usb3vision""mvtec_usb3vision""mvtec_usb3vision""mvtec_usb3vision", 'mvtec_realsense'"mvtec_realsense""mvtec_realsense""mvtec_realsense""mvtec_realsense", 'mvtec_gstreamer'"mvtec_gstreamer""mvtec_gstreamer""mvtec_gstreamer""mvtec_gstreamer", 'mvtec_mediafoundation'"mvtec_mediafoundation""mvtec_mediafoundation""mvtec_mediafoundation""mvtec_mediafoundation", '<plugin_name>'"<plugin_name>""<plugin_name>""<plugin_name>""<plugin_name>"
GenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control) attribute.name-array → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Generic parameter name.
Default:
[]
Suggested values:
'query'"query""query""query""query", 'image_source_handle'"image_source_handle""image_source_handle""image_source_handle""image_source_handle", 'plugin_handle'"plugin_handle""plugin_handle""plugin_handle""plugin_handle", 'interface_handle'"interface_handle""interface_handle""interface_handle""interface_handle", 'device_handle'"device_handle""device_handle""device_handle""device_handle"
GenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control) attribute.value-array → HTupleSequence[Union[str, HHandle]]HTupleHtuple (string / handle) (string / HHandle) (HString / HHandle) (char* / handle)
Generic parameter value.
Default:
[]
Suggested values:
'plugins'"plugins""plugins""plugins""plugins", 'interfaces'"interfaces""interfaces""interfaces""interfaces", 'devices'"devices""devices""devices""devices", 'streams'"streams""streams""streams""streams"
ImageSourceHandlesImageSourceHandlesImageSourceHandlesimageSourceHandlesimage_source_handles (output_control) image_source-array → HImageSource, HTupleSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Image source handles corresponding to modules
available in the system.
Example (HDevelop)
* Query different modules.
query_image_sources ('all', 'query', 'plugins', Plugins)
query_image_sources ('all', 'query', 'interfaces', Interfaces)
query_image_sources ('all', 'query', 'devices', Devices)
* Connect to an available plugin and interface.
connect_image_source (Plugins[0], [], [])
connect_image_source (Interfaces[0], [], [])
* Restrict query to all device modules of one connected plugin.
query_image_sources ('ignore', 'plugin_handle', Plugins[0], PluginSubHandles)
* Restrict query to all sub-modules down to the interface level of one connected plugin.
query_image_sources ('ignore', ['query', 'plugin_handle'], ['interfaces', Plugins[0]], InterfaceHandlesPluginZero)
Result
If the parameter values are correct, query_image_sourcesquery_image_sourcesQueryImageSourcesQueryImageSourcesquery_image_sources returns
the value 2 (
H_MSG_TRUE)
. Otherwise an exception is raised.
Possible Successors
connect_image_sourceconnect_image_sourceConnectImageSourceConnectImageSourceconnect_image_source,
get_image_source_paramget_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_param,
set_image_source_paramset_image_source_paramSetImageSourceParamSetImageSourceParamset_image_source_param
Alternatives
create_image_sourcecreate_image_sourceCreateImageSourceCreateImageSourcecreate_image_source
See also
create_image_sourcecreate_image_sourceCreateImageSourceCreateImageSourcecreate_image_source
Module
Foundation