HALCON Reference Manual 10.0.2
Table of Contents / Graphics / Output ClassesClassesClasses | | | Operators

disp_regiondisp_regiondisp_regionDispRegionDispRegion (Operator)

Name

disp_regiondisp_regiondisp_regionDispRegionDispRegion — Displays regions in a window.

Signature

disp_region(DispRegions : : WindowHandle : )

Herror disp_region(const Hobject DispRegions, const Hlong WindowHandle)

Herror T_disp_region(const Hobject DispRegions, const Htuple WindowHandle)

Herror disp_region(Hobject DispRegions, const HTuple& WindowHandle)

void HRegion::DispRegion(const HTuple& WindowHandle) const

void HRegionArray::DispRegion(const HTuple& WindowHandle) const

void HOperatorSetX.DispRegion(
[in] IHUntypedObjectX* DispRegions, [in] VARIANT WindowHandle)

void HRegionX.DispRegion([in] IHWindowX* WindowHandle)

void HWindowX.DispRegion([in] IHRegionX* DispRegions)

static void HOperatorSet.DispRegion(HObject dispRegions, HTuple windowHandle)

void HRegion.DispRegion(HWindow windowHandle)

void HWindow.DispRegion(HRegion dispRegions)

Description

disp_regiondisp_regiondisp_regionDispRegionDispRegion displays the regions in DispRegionsDispRegionsDispRegionsDispRegionsdispRegions in the output window. The parameters for output can be set with the operators set_colorset_colorset_colorSetColorSetColor, set_grayset_grayset_graySetGraySetGray, set_drawset_drawset_drawSetDrawSetDraw, set_line_widthset_line_widthset_line_widthSetLineWidthSetLineWidth, etc.

The color(s) for the display of the regions are determined with set_colorset_colorset_colorSetColorSetColor, set_rgbset_rgbset_rgbSetRgbSetRgb, set_grayset_grayset_graySetGraySetGray or set_coloredset_coloredset_coloredSetColoredSetColored. If more than one region is displayed and more than one color is set, the colors are assigned in a cyclic way to the regions.

The form of the region for output can be modified by set_paintset_paintset_paintSetPaintSetPaint (e.g. encompassing circle, convex hull). The command set_drawset_drawset_drawSetDrawSetDraw determines if the region is filled or only the boundary is drawn. If only the boundary is drawn, the thickness of the boundary will be determined by set_line_widthset_line_widthset_line_widthSetLineWidthSetLineWidth and the style by set_line_styleset_line_styleset_line_styleSetLineStyleSetLineStyle.

Parallelization

Parameters

DispRegionsDispRegionsDispRegionsDispRegionsdispRegions (input_object)  region(-array) objectHRegionHRegionHRegionXHobject

Regions to display.

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Window identifier.

Example (HDevelop)

* Output with 12 colors:
set_colored(WindowHandle,12)
disp_region(SomeSegments,WindowHandle)

* Symbolic representation:
set_draw(WindowHandle,'margin')
set_color(WindowHandle,'red')
set_shape(WindowHandle,'ellipse')
disp_region(SomeSegments,WindowHandle)

* Representation of a margin with pattern:
set_draw(WindowHandle,'margin')
set_color(WindowHandle,'blue')
set_line_style(WindowHandle,[12,3])
disp_region(Segments,WindowHandle)

Example (C)

/* Output with 12 colors: */
set_colored(WindowHandle,12) ;
disp_region(SomeSegments,WindowHandle) ;

/* Symbolic representation: */
set_draw(WindowHandle,"margin") ;
set_color(WindowHandle,"red") ;
set_shape(WindowHandle,"ellipse") ;
disp_region(SomeSegments,WindowHandle) ;

/* Representation of a margin with pattern: */
set_draw(WindowHandle,"margin") ;
create_tuple(&Color,2) ;
set_s(Color,"blue",0) ;
set_s(Color,"red",0) ;
create_tuple(&Handle,1) ;
set_i(Handle,WindowHandle,0) ;
T_set_color(Handle,Color) ;
create_tuple(&Par,2) ;

set_i(Par,12,0) ;
set_i(Par,3,1) ;
T_set_line_style(WindowHandle,Par) ;
disp_region(Segments,WindowHandle) ;

Example (HDevelop)

* Output with 12 colors:
set_colored(WindowHandle,12)
disp_region(SomeSegments,WindowHandle)

* Symbolic representation:
set_draw(WindowHandle,'margin')
set_color(WindowHandle,'red')
set_shape(WindowHandle,'ellipse')
disp_region(SomeSegments,WindowHandle)

* Representation of a margin with pattern:
set_draw(WindowHandle,'margin')
set_color(WindowHandle,'blue')
set_line_style(WindowHandle,[12,3])
disp_region(Segments,WindowHandle)

Example (HDevelop)

* Output with 12 colors:
set_colored(WindowHandle,12)
disp_region(SomeSegments,WindowHandle)

* Symbolic representation:
set_draw(WindowHandle,'margin')
set_color(WindowHandle,'red')
set_shape(WindowHandle,'ellipse')
disp_region(SomeSegments,WindowHandle)

* Representation of a margin with pattern:
set_draw(WindowHandle,'margin')
set_color(WindowHandle,'blue')
set_line_style(WindowHandle,[12,3])
disp_region(Segments,WindowHandle)

Example (HDevelop)

* Output with 12 colors:
set_colored(WindowHandle,12)
disp_region(SomeSegments,WindowHandle)

* Symbolic representation:
set_draw(WindowHandle,'margin')
set_color(WindowHandle,'red')
set_shape(WindowHandle,'ellipse')
disp_region(SomeSegments,WindowHandle)

* Representation of a margin with pattern:
set_draw(WindowHandle,'margin')
set_color(WindowHandle,'blue')
set_line_style(WindowHandle,[12,3])
disp_region(Segments,WindowHandle)

Result

disp_regiondisp_regiondisp_regionDispRegionDispRegion returns 2 (H_MSG_TRUE).

Possible Predecessors

open_windowopen_windowopen_windowOpenWindowOpenWindow, set_rgbset_rgbset_rgbSetRgbSetRgb, set_lutset_lutset_lutSetLutSetLut, set_hsiset_hsiset_hsiSetHsiSetHsi, set_shapeset_shapeset_shapeSetShapeSetShape, set_line_styleset_line_styleset_line_styleSetLineStyleSetLineStyle, set_insertset_insertset_insertSetInsertSetInsert, set_fixset_fixset_fixSetFixSetFix, set_drawset_drawset_drawSetDrawSetDraw, set_colorset_colorset_colorSetColorSetColor, set_coloredset_coloredset_coloredSetColoredSetColored, set_line_widthset_line_widthset_line_widthSetLineWidthSetLineWidth

Alternatives

disp_objdisp_objdisp_objDispObjDispObj, disp_arrowdisp_arrowdisp_arrowDispArrowDispArrow, disp_linedisp_linedisp_lineDispLineDispLine, disp_circledisp_circledisp_circleDispCircleDispCircle, disp_rectangle1disp_rectangle1disp_rectangle1DispRectangle1DispRectangle1, disp_rectangle2disp_rectangle2disp_rectangle2DispRectangle2DispRectangle2, disp_ellipsedisp_ellipsedisp_ellipseDispEllipseDispEllipse

See also

open_windowopen_windowopen_windowOpenWindowOpenWindow, open_textwindowopen_textwindowopen_textwindowOpenTextwindowOpenTextwindow, set_colorset_colorset_colorSetColorSetColor, set_coloredset_coloredset_coloredSetColoredSetColored, set_drawset_drawset_drawSetDrawSetDraw, set_shapeset_shapeset_shapeSetShapeSetShape, set_paintset_paintset_paintSetPaintSetPaint, set_grayset_grayset_graySetGraySetGray, set_rgbset_rgbset_rgbSetRgbSetRgb, set_hsiset_hsiset_hsiSetHsiSetHsi, set_pixelset_pixelset_pixelSetPixelSetPixel, set_line_widthset_line_widthset_line_widthSetLineWidthSetLineWidth, set_line_styleset_line_styleset_line_styleSetLineStyleSetLineStyle, set_insertset_insertset_insertSetInsertSetInsert, set_fixset_fixset_fixSetFixSetFix, paint_regionpaint_regionpaint_regionPaintRegionPaintRegion, dump_windowdump_windowdump_windowDumpWindowDumpWindow

Module

Foundation


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