Skip to content

get_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_paramT_get_image_source_param🔗

説明🔗

get_image_source_paramGetImageSourceParamGetImageSourceParamget_image_source_paramT_get_image_source_param — 画像ソースのパラメータ値を取得する。

書式🔗

get_image_source_param( image_source ImageSourceHandle, string Param, attribute.name GenParamName, attribute.value GenParamValue, out string Value )void GetImageSourceParam( const HTuple& ImageSourceHandle, const HTuple& Param, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Value )static void HOperatorSet.GetImageSourceParam( HTuple imageSourceHandle, HTuple param, HTuple genParamName, HTuple genParamValue, out HTuple value )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]

Herror T_get_image_source_param( 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)

HTuple HImageSource.GetImageSourceParam( string param, HTuple genParamName, HTuple genParamValue )

説明🔗

オペレータ get_image_source_paramGetImageSourceParam は、 画像ソースハンドル ImageSourceHandleimageSourceHandleimage_source_handle に対する パラメータ値またはパラメータのプロパティを Valuevaluevalue に返します。

画像ソースの概念に関する詳細は、Image Source を参照してください。

パラメータは Paramparamparam を使用して指定します。 パラメータグループは汎用パラメータで指定できます。 Paramparamparam から取得可能な情報には2種類あり、 汎用パラメータ GenParamNamegenParamNamegen_param_name によって値を取得するか、 パラメータのメタ情報を取得するかを区別します。

GenParamNamegenParamNamegen_param_name には以下のオプションがあります:

  • 'group'"group" パラメータが属するグループを GenParamValuegenParamValuegen_param_value に以下のいずれかを指定して定義します:

    • 'image_source'"image_source",

    • 'plugin'"plugin",

    • 'interface'"interface",

    • 'local_device'"local_device",

    • 'device'"device",

    • 'stream'"stream".

    汎用パラメータが指定されていない場合、デフォルトで GenParamNamegenParamNamegen_param_name = 'group'"group"、 GenParamValuegenParamValuegen_param_value = 'device'"device" が使用されます。

    グループ 'image_source'"image_source" は常に利用可能ですが、その他のグループには接続が必要です。

  • 'property'"property" Paramparamparam に関するメタ情報を取得します。 GenParamValuegenParamValuegen_param_value に以下のいずれかを指定して、取得したいプロパティを定義します:

    • 'access'"access":アクセス権限を文字列で提供。

      値のリスト: 'na'"na" ((現在) 未使用), 'ro'"ro" (読み取り専用), 'rw'"rw" (読み書き可能), 'wo'"wo" (書き込み専用).

    • 'description'"description":パラメータの説明(文字列)。

    • 'display_name'"display_name":パラメータの表示名(文字列)。

    • 'increment'"increment":ステップ幅(パラメータの型に応じて整数または実数)。

    • 'max'"max":パラメータの最大値(パラメータの型に応じて整数または実数)。

    • 'min'"min":パラメータの最小値(パラメータの型に応じて整数または実数)。

    • 'persistable'"persistable":パラメータの持続性(整数)。

      値のリスト: 00(false)、11(true)。

    • 'tooltip'"tooltip":パラメータの簡易説明。

    • 'type'"type":パラメータの型(文字列)。

      値のリスト: 'boolean'"boolean", 'command'"command", 'enumeration'"enumeration"(許可された文字列のリストにない文字列), 'integer'"integer", 'real'"real", 'register'"register", 'string'"string"。

    • 'values'"values":'enumeration'"enumeration" 型、または一部の 'integer'"integer", 'real'"real" 型において、許容されるすべての値の一覧。

    • 'visibility'"visibility":パラメータの表示レベル。

      値のリスト: 'basic'"basic", 'advanced'"advanced", 'all'"all"。

Image Source Handle Parameters🔗

どのパラメータ Paramparamparam が取得可能かは、画像ソースおよびその状態に依存します。 一部のパラメータはハードウェアまたはソフトウェアの製造元に固有であり、また、画像ソースが接続状態であるかどうかにも依存します。 ただし、'image_source'"image_source" グループのパラメータは常に使用可能です。 以下の表は、set_image_source_paramSetImageSourceParam および get_image_source_paramGetImageSourceParam で設定・取得可能なパラメータの概要です。 各パラメータの説明は表の下に記載されています。

GenParamNamegenParamNamegen_param_name set get
'device_access_flags'"device_access_flags" x x
'device_access_status'"device_access_status" x
'device_connect_mode'"device_connect_mode" x
'device_id'"device_id" x x
'device_is_connected'"device_is_connected" x
'device_query_timeout'"device_query_timeout" x x
'device_user_name'"device_user_name" x x
'device_serial_number'"device_serial_number" x x
'fetch_timeout'"fetch_timeout" x x
'interface_connect_mode'"interface_connect_mode" x
'interface_display_name'"interface_display_name" x
'interface_id'"interface_id" x x
'interface_is_connected'"interface_is_connected" x
'interface_query_timeout'"interface_query_timeout" x x
'num_buffers'"num_buffers" x x
'plugin_connect_mode'"plugin_connect_mode" x
'plugin_is_connected'"plugin_is_connected" x
'plugin_name'"plugin_name" x x
'plugin_path'"plugin_path" x x
'stream_connect_mode'"stream_connect_mode" x
'stream_id'"stream_id" x x
'stream_is_connected'"stream_is_connected" x
'stream_state'"stream_state" x
'version'"version" x
  • 'device_access_flags'"device_access_flags" デバイスへの接続時に使用される GenTL アクセスフラグ。

    • 'control'"control": 他のホスト/プロセスが読み取り専用でアクセスできるようにデバイスを開きます。このプロセスでは読み書きが可能です。

    • 'exclusive'"exclusive": このホスト/プロセスのみがアクセス可能な状態でデバイスを開きます。このプロセスでは読み書きが可能です。

    • 'none'"none": デバイスが開かれていないか、接続しようとしてアクセスが拒否されたことを示します。

    • 'read_only'"read_only": デバイスを読み取り専用で開きます。すべてのポート関数は読み取りのみ可能です。

    • 'unknown'"unknown": コマンドでは使用されません。情報取得用の初期化に使用されることがあります。

  • 'device_access_status'"device_access_status" デバイスの現在の GenTL アクセス状態。

    • 'busy'"busy": 他のプロセス/ホストによって 'exclusive'"exclusive" モードで既にデバイスが開かれています。

    • 'open_read_only'"open_read_only": このプロセスでデバイスが読み取り専用モードで開かれています。他のアプリケーションが 'control'"control" モードを持っています('device_access_flags'"device_access_flags" 参照)。

    • 'open_read_write'"open_read_write": このプロセスでデバイスが 'exclusive'"exclusive" または 'control'"control" モードで開かれています('device_access_flags'"device_access_flags" 参照)。

    • 'no_access'"no_access": デバイスにアクセスできません(接続できません)。

    • 'read_only'"read_only": デバイスは読み取り専用で利用可能です。

    • 'read_write'"read_write": デバイスは読み書き可能です('device_access_flags'"device_access_flags" 参照)。

    • 'unknown'"unknown": デバイスのアクセス可能状態が不明です。

  • 'device_connect_mode'"device_connect_mode" デバイスモジュールの接続モード。

    • 'automatic'"automatic": 識別子が指定されていない場合に、自動でモジュールを検索して接続します。

    • 'exact'"exact": モジュール接続に識別子が明示的に指定されています。

    • 'none'"none": モジュール接続は不要です。

  • 'device_id'"device_id" デバイスのID(文字列)。connect_image_sourceConnectImageSource 呼び出し時に、接続するデバイスモジュールを指定するために使用できます。

  • 'device_is_connected'"device_is_connected" デバイスの接続状態(整数)。

    値のリスト: 00(未接続)、11(接続済み)。

  • 'device_query_timeout'"device_query_timeout" デバイスクエリの中断までのタイムアウト[ms]。GigEVisionトランスポート層におけるデバイス探索のタイムアウトとして使用されます。 -1-1 を指定すると、タイムアウトは無限に設定されます。

    初期値: 11001100

  • 'device_serial_number'"device_serial_number" デバイスのシリアル番号(文字列)。'device_id'"device_id" を使用したくない場合に、接続対象のデバイス指定に使用可能です。

  • 'device_user_name'"device_user_name" デバイスのユーザー名(文字列)。'device_id'"device_id" を使用したくない場合に、接続対象のデバイス指定に使用可能です。

  • 'fetch_timeout'"fetch_timeout" 画像取得中断までのタイムアウト[ms]。-1-1 を指定すると、無限になります。

    初期値: 50005000

  • 'interface_connect_mode'"interface_connect_mode" インターフェースモジュールの接続モード。

    • 'automatic'"automatic": 識別子が指定されていない場合に、自動でモジュールを検索して接続します。

    • 'exact'"exact": 識別子が明示的に指定されています。

    • 'none'"none": モジュール接続は不要です。

  • 'interface_display_name'"interface_display_name" インターフェースモジュールの、ヒューマンリーダブルな識別名(文字列)。

  • 'interface_id'"interface_id" インターフェースのID(文字列)。connect_image_sourceConnectImageSource 呼び出し時に指定可能です。

  • 'interface_is_connected'"interface_is_connected" インターフェースの接続状態(整数)。

    値のリスト: 00(未接続)、11(接続済み)。

  • 'interface_query_timeout'"interface_query_timeout" インターフェースクエリの中断までのタイムアウト[ms]。 -1-1 を指定すると無限になります。

    初期値: 11001100

  • 'num_buffers'"num_buffers" start_image_sourceStartImageSource によって画像受信用に準備されるバッファ数。 ホストシステムの短時間のピーク負荷による画像の取りこぼしを防ぐのに役立ちます。 バッファ数は start_image_sourceStartImageSource を呼び出す前のみ変更可能です。

    初期値: 44

  • 'plugin_connect_mode'"plugin_connect_mode" プラグインモジュールの接続モード。

    • 'automatic'"automatic": 識別子なしで自動接続。

    • 'exact'"exact": 明示された識別子で接続。

    • 'none'"none": 接続不要。

  • 'plugin_is_connected'"plugin_is_connected" プラグインの接続状態(整数)。

    値のリスト: 00(未接続)、11(接続済み)。

  • 'plugin_name'"plugin_name" プラグイン名(文字列)。

  • 'plugin_path'"plugin_path" .cti プラグインファイルへのパス。 GenTL 環境変数が目的のプラグインファイルの場所を含まない場合でも、明示的にパスを指定するために使用できます。

  • 'stream_connect_mode'"stream_connect_mode" ストリームモジュールの接続モード。

    • 'automatic'"automatic": 自動接続。

    • 'exact'"exact": 識別子を指定して接続。

    • 'none'"none": 接続不要。

  • 'stream_id'"stream_id" ストリームのID(文字列)。connect_image_sourceConnectImageSource で使用可能。

  • 'stream_is_connected'"stream_is_connected" ストリームの接続状態(整数)。

    値のリスト: 00(未接続)、11(接続済み)。

  • 'stream_state'"stream_state" ストリームの現在の状態。

    • 'initialized'"initialized": ストリームは初期化済みですが、動作していません。

    • 'running'"running": ストリームは実行中。画像受信のためのリソース(スレッドやバッファなど)が割り当てられています。 デバイスの設定に応じて、この状態では常に画像がバックグラウンドで送信されます。

  • 'version'"version" 画像ソースライブラリのバージョン。

MVTecが提供するプラグインについては、MVTecの MVTec Interfaces Reference Documentationにすべてのプラグイン固有のパラメータが記載されています。 その他のパラメータについては、該当するソフトウェアまたはハードウェアメーカーのドキュメントを参照してください。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

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

画像ソースのハンドル。

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

取得するパラメータ。

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

汎用パラメータ名。

初期値: [][]
推奨値: 'group', 'property'"group", "property"

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*)

汎用パラメータ値。

初期値: [][]
推奨値: 'image_source', 'plugin', 'interface', 'local_device', 'device', 'stream', 'tooltip', 'description', 'display_name', 'visibility', 'access', 'type', 'persistable', 'min', 'max', 'increment', 'values'"image_source", "plugin", "interface", "local_device", "device", "stream", "tooltip", "description", "display_name", "visibility", "access", "type", "persistable", "min", "max", "increment", "values"

Valuevaluevalue (output_control) string-array → (string / real / integer / handle)HTuple (HString / double / Hlong / HHandle)HTuple (string / double / int / long / HHandle)Sequence[HTupleElementType]Htuple (char* / double / Hlong / handle)

取得された値。

例🔗

(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)

結果🔗

パラメータ値が正しければ、get_image_source_paramGetImageSourceParam は 2 (H_MSG_TRUE) を返します。そうでない場合は、例外が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

query_image_sourcesQueryImageSources, create_image_sourceCreateImageSource, connect_image_sourceConnectImageSource

後処理の候補

set_image_source_paramSetImageSourceParam, disconnect_image_sourceDisconnectImageSource

関連項目

set_image_source_paramSetImageSourceParam

モジュール🔗

Foundation