ClassesClassesClassesClasses | | | | Operators

obj_to_integerobj_to_integerObjToIntegerobj_to_integerObjToIntegerObjToInteger (Operator)

Name

obj_to_integerobj_to_integerObjToIntegerobj_to_integerObjToIntegerObjToInteger — Convert an iconic object into an “integer number.”

Signature

obj_to_integer(Objects : : Index, Number : SurrogateTuple)

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

Herror obj_to_integer(Hobject Objects, const HTuple& Index, const HTuple& Number, Hlong* SurrogateTuple)

Herror obj_to_integer(Hobject Objects, const HTuple& Index, const HTuple& Number, HTuple* SurrogateTuple)

void ObjToInteger(const HObject& Objects, const HTuple& Index, const HTuple& Number, HTuple* SurrogateTuple)

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

void HOperatorSetX.ObjToInteger(
[in] IHUntypedObjectX* Objects, [in] VARIANT Index, [in] VARIANT Number, [out] VARIANT* SurrogateTuple)

VARIANT HImageX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HRegionX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HUntypedObjectX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HXLDContX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HXLDPolyX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HXLDParaX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HXLDModParaX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

VARIANT HXLDExtParaX.ObjToInteger(
[in] Hlong Index, [in] Hlong Number)

static void HOperatorSet.ObjToInteger(HObject objects, HTuple index, HTuple number, out HTuple surrogateTuple)

HTuple HObject.ObjToInteger(int index, int number)

Description

obj_to_integerobj_to_integerObjToIntegerobj_to_integerObjToIntegerObjToInteger stores NumberNumberNumberNumberNumbernumber, starting at index IndexIndexIndexIndexIndexindex, of the database keys of the input object ObjectsObjectsObjectsObjectsObjectsobjects as integer numbers in the output parameter SurrogateTupleSurrogateTupleSurrogateTupleSurrogateTupleSurrogateTuplesurrogateTuple. If -1 is passed for NumberNumberNumberNumberNumbernumber all objects beginning with IndexIndexIndexIndexIndexindex are copied. This facilitates a direct access to an arbitrary element of ObjectsObjectsObjectsObjectsObjectsobjects. In conjunction with count_objcount_objCountObjcount_objCountObjCountObj (returns the number of objects in ObjectsObjectsObjectsObjectsObjectsobjects) the elements of ObjectsObjectsObjectsObjectsObjectsobjects can be processed successively. The objects are not duplicated by obj_to_integerobj_to_integerObjToIntegerobj_to_integerObjToIntegerObjToInteger and thus must not be cleared by clear_objclear_objClearObjclear_objClearObjClearObj.

For a short description of the iconic objects that are available in HALCON see the introduction of chapter Object.

Attention

The objects' data is not duplicated.

Parallelization

Parameters

ObjectsObjectsObjectsObjectsObjectsobjects (input_object)  object(-array) objectHObjectHObjectHObjectHObjectXHobject

Objects for which the surrogates are to be returned.

IndexIndexIndexIndexIndexindex (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Starting index of the surrogates to be returned.

Default value: 1

Typical range of values: 1 ≤ Index Index Index Index Index index

NumberNumberNumberNumberNumbernumber (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of surrogates to be returned.

Default value: -1

Restriction: Number == -1 || Number + Index <= number(Objects)

SurrogateTupleSurrogateTupleSurrogateTupleSurrogateTupleSurrogateTuplesurrogateTuple (output_control)  pointer(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Tuple containing the surrogates.

Example (HDevelop)

* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)

Example (C)

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

Example (HDevelop)

* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)

Example (HDevelop)

* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)

Example (HDevelop)

* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)

Example (HDevelop)

* Access the i-th element:
obj_to_integer(Objects,i,1,Surrogat)

Complexity

Runtime complexity: O(|ObjectsObjectsObjectsObjectsObjectsobjects| + NumberNumberNumberNumberNumbernumber)

Result

obj_to_integerobj_to_integerObjToIntegerobj_to_integerObjToIntegerObjToInteger returns 2 (H_MSG_TRUE) if all parameters are correct. If the input is empty the behavior can be set via set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Alternatives

copy_objcopy_objCopyObjcopy_objCopyObjCopyObj, select_objselect_objSelectObjselect_objSelectObjSelectObj, copy_imagecopy_imageCopyImagecopy_imageCopyImageCopyImage, gen_image_protogen_image_protoGenImageProtogen_image_protoGenImageProtoGenImageProto

See also

integer_to_objinteger_to_objIntegerToObjinteger_to_objIntegerToObjIntegerToObj, count_objcount_objCountObjcount_objCountObjCountObj

Module

Foundation


ClassesClassesClassesClasses | | | | Operators