set_paintT_set_paintSetPaintSetPaintset_paint (Operator)

Name

set_paintT_set_paintSetPaintSetPaintset_paint — 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)

def set_paint(window_handle: HHandle, mode: Sequence[Union[int, str, float]]) -> None

Description

set_paintset_paintSetPaintSetPaintSetPaintset_paint defines the output mode for gray value display (single- or multichannel) in the window. The mode is used by disp_objdisp_objDispObjDispObjDispObjdisp_obj, disp_imagedisp_imageDispImageDispImageDispImagedisp_image, and disp_colordisp_colorDispColorDispColorDispColordisp_color.

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_poseUpdateWindowPoseUpdateWindowPoseUpdateWindowPoseupdate_window_pose 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_paintQueryPaintQueryPaintQueryPaintquery_paint.

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_paintSetPaintSetPaintSetPaintset_paint call is necessary in this case.

Apart from set_paintset_paintSetPaintSetPaintSetPaintset_paint there are other operators that affect the output of gray values. The most important of them are set_partset_partSetPartSetPartSetPartset_part, set_part_styleset_part_styleSetPartStyleSetPartStyleSetPartStyleset_part_style and set_lutset_lutSetLutSetLutSetLutset_lut. Some output modes display gray values using region output (e.g., '3d_plot_lines'). In these modes, parameters set with set_colorset_colorSetColorSetColorSetColorset_color, set_rgbset_rgbSetRgbSetRgbSetRgbset_rgb,set_hsiset_hsiSetHsiSetHsiSetHsiset_hsi, set_shapeset_shapeSetShapeSetShapeSetShapeset_shape, set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width and set_insertset_insertSetInsertSetInsertSetInsertset_insert influence gray value output. In case of unexpected results, check the values for the parameter display.

Modes:

Execution Information

Parameters

WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (input_control)  window HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Window handle.

ModeModeModeModemodemode (input_control)  string-array HTupleSequence[Union[int, str, float]]HTupleHtuple (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" "default"

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

Result

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

Possible Predecessors

query_paintquery_paintQueryPaintQueryPaintQueryPaintquery_paint, get_paintget_paintGetPaintGetPaintGetPaintget_paint

Possible Successors

disp_imagedisp_imageDispImageDispImageDispImagedisp_image

See also

get_paintget_paintGetPaintGetPaintGetPaintget_paint, query_paintquery_paintQueryPaintQueryPaintQueryPaintquery_paint, disp_imagedisp_imageDispImageDispImageDispImagedisp_image, set_shapeset_shapeSetShapeSetShapeSetShapeset_shape, set_rgbset_rgbSetRgbSetRgbSetRgbset_rgb, set_colorset_colorSetColorSetColorSetColorset_color, set_grayset_graySetGraySetGraySetGrayset_gray, set_window_paramset_window_paramSetWindowParamSetWindowParamSetWindowParamset_window_param, update_window_poseupdate_window_poseUpdateWindowPoseUpdateWindowPoseUpdateWindowPoseupdate_window_pose

Module

Foundation