ClassesClasses | | Operators

set_paintT_set_paintSetPaintSetPaint (Operator)

Name

set_paintT_set_paintSetPaintSetPaint — Define the gray value output mode.

Signature

set_paint( : : WindowHandle, Mode : )

Herror T_set_paint(const Htuple WindowHandle, const Htuple Mode)

void SetPaint(const HTuple& WindowHandle, const HTuple& Mode)

void HWindow::SetPaint(const HTuple& Mode) const

static void HOperatorSet.SetPaint(HTuple windowHandle, HTuple mode)

void HWindow.SetPaint(HTuple mode)

Description

set_paintset_paintSetPaintSetPaintSetPaint defines the output mode for gray value display (single- or multichannel) in the window. The mode is used by disp_objdisp_objDispObjDispObjDispObj, disp_imagedisp_imageDispImageDispImageDispImage, and disp_colordisp_colorDispColorDispColorDispColor.

This page describes the different modes that can be used for gray value output. It should be noted that the mode 'default' is the most suitable in almost all cases.

Gray images can also be interpreted as 3D data, depending on the gray value. To view these 3D plots, select the modes '3d_plot'. If your graphics card supports OpenGL, choose this for a high quality plot that is well suited for interactive display (see update_window_poseupdate_window_poseUpdateWindowPoseUpdateWindowPoseUpdateWindowPose on how to make the display interactive).

Three-channel images are interpreted as RGB images.

Vector field images can be viewed as 'vector_field'.

All available painting modes can be queried with query_paintquery_paintQueryPaintQueryPaintQueryPaint.

Parameters for modes that need more than one parameter can be passed the following ways:

If the current mode is 'default', HALCON chooses a suitable algorithm for the output of 2- and 3-channel images. No set_paintset_paintSetPaintSetPaintSetPaint call is necessary in this case.

Apart from set_paintset_paintSetPaintSetPaintSetPaint there are other operators that affect the output of gray values. The most important of them are set_partset_partSetPartSetPartSetPart, set_part_styleset_part_styleSetPartStyleSetPartStyleSetPartStyle and set_lutset_lutSetLutSetLutSetLut. Some output modes display gray values using region output (e.g. 'histogram','contourline','3d_plot_lines', etc.). In these modes, parameters set with set_colorset_colorSetColorSetColorSetColor, set_rgbset_rgbSetRgbSetRgbSetRgb,set_hsiset_hsiSetHsiSetHsiSetHsi, set_shapeset_shapeSetShapeSetShapeSetShape, set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidth and set_insertset_insertSetInsertSetInsertSetInsert influence gray value output. This can lead to unexpected results when using set_shape('convex')set_shape("convex")SetShape("convex")SetShape("convex")SetShape("convex") and set_paint(WindowHandle,'histogram')set_paint(WindowHandle,"histogram")SetPaint(WindowHandle,"histogram")SetPaint(WindowHandle,"histogram")SetPaint(WindowHandle,"histogram"). Here, the convex hull of the histogram is displayed.

Modes:

Execution Information

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

ModeModeModeModemode (input_control)  string-array HTupleHTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

Output mode. Additional parameters possible.

Default value: 'default' "default" "default" "default" "default"

List of values: '3d_plot'"3d_plot""3d_plot""3d_plot""3d_plot", 'default'"default""default""default""default", 'vector_field'"vector_field""vector_field""vector_field""vector_field"

Result

set_paintset_paintSetPaintSetPaintSetPaint returns 2 (H_MSG_TRUE) if the parameter is correct and the window is valid. Otherwise an exception is raised.

Possible Predecessors

query_paintquery_paintQueryPaintQueryPaintQueryPaint, get_paintget_paintGetPaintGetPaintGetPaint

Possible Successors

disp_imagedisp_imageDispImageDispImageDispImage

See also

get_paintget_paintGetPaintGetPaintGetPaint, query_paintquery_paintQueryPaintQueryPaintQueryPaint, disp_imagedisp_imageDispImageDispImageDispImage, set_shapeset_shapeSetShapeSetShapeSetShape, set_rgbset_rgbSetRgbSetRgbSetRgb, set_colorset_colorSetColorSetColorSetColor, set_grayset_graySetGraySetGraySetGray, set_window_paramset_window_paramSetWindowParamSetWindowParamSetWindowParam, update_window_poseupdate_window_poseUpdateWindowPoseUpdateWindowPoseUpdateWindowPose

Module

Foundation


ClassesClasses | | Operators