Skip to content

query_image_sourcesQueryImageSourcesQueryImageSourcesquery_image_sourcesT_query_image_sources🔗

Short description🔗

query_image_sourcesQueryImageSourcesQueryImageSourcesquery_image_sourcesT_query_image_sources — Returns handles corresponding to image sources.

Signature🔗

query_image_sources( string PluginName, attribute.name GenParamName, attribute.value GenParamValue, out image_source ImageSourceHandles )void QueryImageSources( const HTuple& PluginName, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* ImageSourceHandles )static void HOperatorSet.QueryImageSources( HTuple pluginName, HTuple genParamName, HTuple genParamValue, out HTuple imageSourceHandles )def query_image_sources( plugin_name: str, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[str, HHandle]] ) -> Sequence[HHandle]

Herror T_query_image_sources( const Htuple PluginName, const Htuple GenParamName, const Htuple GenParamValue, Htuple* ImageSourceHandles )

static HImageSourceArray HImageSource::QueryImageSources( const HString& PluginName, const HTuple& GenParamName, const HTuple& GenParamValue )

static HImageSourceArray HImageSource::QueryImageSources( const char* PluginName, const HTuple& GenParamName, const HTuple& GenParamValue )

static HImageSourceArray HImageSource::QueryImageSources( const wchar_t* PluginName, const HTuple& GenParamName, const HTuple& GenParamValue ) (Windows only)

static HImageSource[] HImageSource.QueryImageSources( string pluginName, HTuple genParamName, HTuple genParamValue )

Description🔗

According to the query specified by the plugin name and the input generic parameters, query_image_sourcesQueryImageSources returns the corresponding handles in ImageSourceHandlesimageSourceHandlesimage_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. See the MVTec Interfaces Reference Documentation for the documentation of individual MVTec image source plugins.

To restrict the query to a specific plugin its name can be specified in PluginNamepluginNameplugin_name. Set 'all'"all" to query all available plugins at the same time. When querying information on a specific plugin or interface handle, set PluginNamepluginNameplugin_name to 'ignore'"ignore".

List of values: 'all'"all", 'ignore'"ignore", '<plugin_name>'"<plugin_name>".

Default: 'all'"all".

The generic parameters GenParamNamegenParamNamegen_param_name and GenParamValuegenParamValuegen_param_value are used to specify the scope of the query. The supported GenParamNamegenParamNamegen_param_name are:

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.

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🔗

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

Name of an image source plugin.

Default: 'all'"all"
Suggested values: 'all', 'ignore', 'mvtec_gigevision', 'mvtec_usb3vision', 'mvtec_realsense', 'mvtec_gstreamer', 'mvtec_mediafoundation', '<plugin_name>'"all", "ignore", "mvtec_gigevision", "mvtec_usb3vision", "mvtec_realsense", "mvtec_gstreamer", "mvtec_mediafoundation", "<plugin_name>"

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

Generic parameter name.

Default: [][]
Suggested values: 'query', 'image_source_handle', 'plugin_handle', 'interface_handle', 'device_handle'"query", "image_source_handle", "plugin_handle", "interface_handle", "device_handle"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value-array → (string / handle)HTuple (HString / HHandle)HTuple (string / HHandle)Sequence[Union[str, HHandle]]Htuple (char* / handle)

Generic parameter value.

Default: [][]
Suggested values: 'plugins', 'interfaces', 'devices', 'streams'"plugins", "interfaces", "devices", "streams"

ImageSourceHandlesimageSourceHandlesimage_source_handles (output_control) image_source-array → (handle)HTuple (HHandle)HImageSource, HTuple (IntPtr)Sequence[HHandle]Htuple (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_sourcesQueryImageSources returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible successors

connect_image_sourceConnectImageSource, get_image_source_paramGetImageSourceParam, set_image_source_paramSetImageSourceParam

Alternatives

create_image_sourceCreateImageSource

See also

create_image_sourceCreateImageSource

Module🔗

Foundation