Skip to content

obj_to_integerObjToIntegerObjToIntegerobj_to_integerobj_to_integer🔗

説明🔗

obj_to_integerObjToIntegerObjToIntegerobj_to_integerobj_to_integer — アイコンオブジェクトを整数に変換する。

書式🔗

obj_to_integer( object Objects, integer Index, integer Number, out pointer SurrogateTuple )void ObjToInteger( const HObject& Objects, const HTuple& Index, const HTuple& Number, HTuple* SurrogateTuple )static void HOperatorSet.ObjToInteger( HObject objects, HTuple index, HTuple number, out HTuple surrogateTuple )def obj_to_integer( objects: HObject, index: int, number: int ) -> Sequence[int]

def obj_to_integer_s( objects: HObject, index: int, number: int ) -> intHerror obj_to_integer( const Hobject Objects, const Hlong Index, const Hlong Number, Hlong* SurrogateTuple )

Herror T_obj_to_integer( const Hobject Objects, const Htuple Index, const Htuple Number, Htuple* SurrogateTuple )

HTuple HObject::ObjToInteger( Hlong Index, Hlong Number ) const

HTuple HObject.ObjToInteger( int index, int number )

説明🔗

obj_to_integerObjToInteger は、インデックス Indexindexindex から始まる 入力オブジェクト Objectsobjectsobjects のデータベースキーの Numbernumbernumber を出力パラメーター SurrogateTuplesurrogateTuplesurrogate_tuple の整数 として保存します。-1 が Numbernumbernumber に渡されると、 Indexindexindex から始まるすべてのオブジェクトがコピーされます。こ れは Objectsobjectsobjects の任意の要素に直接簡単にアクセスすることがで きます。count_objCountObj (Objectsobjectsobjects にオブジェクト数を返 す)とともに、Objectsobjectsobjects の要素を続けて処理することができま す。オブジェクトは obj_to_integerObjToInteger によって複製されることは ないため、clear_objClearObj によって削除してはなりません。

HALCON で使用できるアイコンオブジェクトの簡単な説明はObjectの章を参照してください。

注意🔗

オブジェクトのデータは複製されません。

実行情報🔗

実行情報
  • 演算デバイス上のオブジェクトをサポート。

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

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

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

パラメーター🔗

Objectsobjectsobjects (input_object) object(-array) → objectHObjectHObjectHObjectHobject

代理が返されるオブジェクト

Indexindexindex (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

返される代理の開始インデックス

初期値: 11
値域: 1 ≤ Index

Numbernumbernumber (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

返される代理の数

初期値: -1-1
制限: (Number == -1) || (Number + Index <= number(Objects))

SurrogateTuplesurrogateTuplesurrogate_tuple (output_control) pointer(-array) → (integer)HTuple (Hlong)HTuple (IntPtr)Sequence[int]Htuple (Hlong)

代理を含む Tuple

例🔗

(HDevelop)


* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)
(C)
/* Access the i-th element: */
Hlong i,Surrogate\;
obj_to_integer(Objects,i,1,&Surrogat)\;

複雑性🔗

実行時間の複雑性: \(O(|\textrm{Objects}| + \textrm{Number})\)

結果🔗

obj_to_integerObjToInteger は、すべてのパラメーターが正しい場合に 2 (H_MSG_TRUE) を返します。入力が空の場合、動作は set_system(::'no_object_result',<Result>:) を通じて設定で きます。 必要に応じて、例外が発生します。

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

組み合わせ

他の選択候補

copy_objCopyObj, select_objSelectObj, copy_imageCopyImage, gen_image_protoGenImageProto

関連項目

integer_to_objIntegerToObj, count_objCountObj

モジュール🔗

Foundation