HALCON Reference Manual 10.0.2
Table of Contents / Object / Manipulation ClassesClassesClasses | | | Operators

select_objselect_objselect_objSelectObjSelectObj (Operator)

Name

select_objselect_objselect_objSelectObjSelectObj — Select objects from an object tuple.

Signature

select_obj(Objects : ObjectSelected : Index : )

Herror select_obj(const Hobject Objects, Hobject* ObjectSelected, const Hlong Index)

Herror T_select_obj(const Hobject Objects, Hobject* ObjectSelected, const Htuple Index)

Herror select_obj(Hobject Objects, Hobject* ObjectSelected, const HTuple& Index)

void HOperatorSetX.SelectObj(
[in] IHUntypedObjectX* Objects, [out] IHUntypedObjectX*ObjectSelected, [in] VARIANT Index)

IHImageX* HImageX.SelectObj([in] VARIANT Index)

IHRegionX* HRegionX.SelectObj([in] VARIANT Index)

IHUntypedObjectX* HUntypedObjectX.SelectObj([in] VARIANT Index)

IHXLDContX* HXLDContX.SelectObj([in] VARIANT Index)

IHXLDPolyX* HXLDPolyX.SelectObj([in] VARIANT Index)

IHXLDParaX* HXLDParaX.SelectObj([in] VARIANT Index)

IHXLDModParaX* HXLDModParaX.SelectObj([in] VARIANT Index)

IHXLDExtParaX* HXLDExtParaX.SelectObj([in] VARIANT Index)

static void HOperatorSet.SelectObj(HObject objects, out HObject objectSelected, HTuple index)

HObject HObject.SelectObj(HTuple index)

HObject HObject.SelectObj(int index)

HImage HImage.SelectObj(HTuple index)

HImage HImage.SelectObj(int index)

HRegion HRegion.SelectObj(HTuple index)

HRegion HRegion.SelectObj(int index)

HXLD HXLD.SelectObj(HTuple index)

HXLD HXLD.SelectObj(int index)

HXLDCont HXLDCont.SelectObj(HTuple index)

HXLDCont HXLDCont.SelectObj(int index)

HXLDPoly HXLDPoly.SelectObj(HTuple index)

HXLDPoly HXLDPoly.SelectObj(int index)

HXLDPara HXLDPara.SelectObj(HTuple index)

HXLDPara HXLDPara.SelectObj(int index)

HXLDModPara HXLDModPara.SelectObj(HTuple index)

HXLDModPara HXLDModPara.SelectObj(int index)

HXLDExtPara HXLDExtPara.SelectObj(HTuple index)

HXLDExtPara HXLDExtPara.SelectObj(int index)

Description

select_objselect_objselect_objSelectObjSelectObj copies the iconic objects with the indices given by IndexIndexIndexIndexindex (starting with 1) from the iconic input object tuple ObjectsObjectsObjectsObjectsobjects to the output object ObjectSelectedObjectSelectedObjectSelectedObjectSelectedobjectSelected. No new storage is allocated for the regions and images. Instead, new objects containing references to the existing objects are created. The number of objects in an object tuple can be queried with the operator count_objcount_objcount_objCountObjCountObj.

Parallelization

Parameters

ObjectsObjectsObjectsObjectsobjects (input_object)  object(-array) objectHObjectHObjectHObjectXHobject

Input objects.

ObjectSelectedObjectSelectedObjectSelectedObjectSelectedobjectSelected (output_object)  object(-array) objectHObjectHObjectHObjectXHobject *

Selected objects.

IndexIndexIndexIndexindex (input_control)  integer(-array) HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Indices of the objects to be selected.

Default value: 1

Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 50, 100, 200, 500, 1000, 2000, 5000

Restriction: Index >= 1

Example (C)

/* Access to all Regions */

count_obj(Regions,&Num);
for (i=1; i<=Num; i++)
{
  select_obj(Regions,&Single,i);
  T_get_region_polygon(Single,5.0,&Row,&Column);
  T_disp_polygon(WindowHandleTuple,Row,Column);
  destroy_tuple(Row);
  destroy_tuple(Column);
  clear_obj(Single);
}

Complexity

Runtime complexity: O(|ObjectsObjectsObjectsObjectsobjects|)

Result

select_objselect_objselect_objSelectObjSelectObj returns 2 (H_MSG_TRUE) if all objects are contained in the HALCON database and 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

count_objcount_objcount_objCountObjCountObj

Alternatives

copy_objcopy_objcopy_objCopyObjCopyObj

See also

count_objcount_objcount_objCountObjCountObj, concat_objconcat_objconcat_objConcatObjConcatObj, obj_to_integerobj_to_integerobj_to_integerObjToIntegerObjToInteger

Module

Foundation


Table of Contents / Object / Manipulation ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH