set_pixelT_set_pixelSetPixelSetPixel (Operator)

Name

set_pixelT_set_pixelSetPixelSetPixel — Define a color lookup table index.

Warning

set_pixelset_pixelSetPixelSetPixelSetPixel is obsolete and is only provided for reasons of backward compatibility.

Signature

set_pixel( : : WindowHandle, Pixel : )

Herror T_set_pixel(const Htuple WindowHandle, const Htuple Pixel)

void SetPixel(const HTuple& WindowHandle, const HTuple& Pixel)

void HWindow::SetPixel(const HTuple& Pixel) const

void HWindow::SetPixel(Hlong Pixel) const

static void HOperatorSet.SetPixel(HTuple windowHandle, HTuple pixel)

void HWindow.SetPixel(HTuple pixel)

void HWindow.SetPixel(int pixel)

Description

set_pixelset_pixelSetPixelSetPixelSetPixel sets pixel values: colors (set_colorset_colorSetColorSetColorSetColor, set_rgbset_rgbSetRgbSetRgbSetRgb, etc.) and gray values (set_grayset_graySetGraySetGraySetGray) are coded together into a number, called pixel. This 'pixel' is an index in the color lookup table. It ranges from 0 to 1 in b/w images and 0 to 255 color images with 8 bit planes. It is different from the 'pixel' ("picture element") in image processing. Therefore HALCON distinguishes between pixel and image element (or gray value).

The current value can be queried with get_pixelget_pixelGetPixelGetPixelGetPixel.

Execution Information

Parameters

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

Window handle.

PixelPixelPixelPixelpixel (input_control)  integer(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Color lookup table index.

Default value: 128

Typical range of values: 0 ≤ Pixel Pixel Pixel Pixel pixel ≤ 255

Result

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

Possible Predecessors

get_pixelget_pixelGetPixelGetPixelGetPixel

Possible Successors

disp_imagedisp_imageDispImageDispImageDispImage, disp_regiondisp_regionDispRegionDispRegionDispRegion

Alternatives

set_rgbset_rgbSetRgbSetRgbSetRgb, set_colorset_colorSetColorSetColorSetColor, set_hsiset_hsiSetHsiSetHsiSetHsi

See also

get_pixelget_pixelGetPixelGetPixelGetPixel, set_lutset_lutSetLutSetLutSetLut, disp_regiondisp_regionDispRegionDispRegionDispRegion, disp_imagedisp_imageDispImageDispImageDispImage, disp_colordisp_colorDispColorDispColorDispColor

Module

Foundation