Skip to content

set_pixelSetPixelSetPixelset_pixelT_set_pixelπŸ”—

Short descriptionπŸ”—

set_pixelSetPixelSetPixelset_pixelT_set_pixel β€” Define a color lookup table index.

WarningπŸ”—

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

SignatureπŸ”—

set_pixel( window WindowHandle, integer Pixel )void SetPixel( const HTuple& WindowHandle, const HTuple& Pixel )static void HOperatorSet.SetPixel( HTuple windowHandle, HTuple pixel )def set_pixel( window_handle: HHandle, pixel: MaybeSequence[int] ) -> None

Herror T_set_pixel( const Htuple WindowHandle, const Htuple Pixel )

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

void HWindow::SetPixel( Hlong Pixel ) const

void HWindow.SetPixel( HTuple pixel )

void HWindow.SetPixel( int pixel )

DescriptionπŸ”—

set_pixelSetPixel sets pixel values: colors (set_colorSetColor, set_rgbSetRgb, etc.) and gray values (set_graySetGray) 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_pixelGetPixel.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

WindowHandlewindowHandlewindow_handle (input_control) window β†’ (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window handle.

Pixelpixelpixel (input_control) integer(-array) β†’ (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Color lookup table index.

Default: 128128
Value range: 0 ≀ Pixel ≀ 255

ResultπŸ”—

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

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

get_pixelGetPixel

Possible successors

disp_imageDispImage, disp_regionDispRegion

Alternatives

set_rgbSetRgb, set_colorSetColor, set_hsiSetHsi

See also

get_pixelGetPixel, set_lutSetLut, disp_regionDispRegion, disp_imageDispImage, disp_colorDispColor

ModuleπŸ”—

Foundation