csaxs_bec.bec_widgets.widgets.xray_eye.x_ray_eye.TargetCrosshair#

class TargetCrosshair(plot_item: PlotItem)[source]#

Bases: object

Fixed, RPC-positionable crosshair overlay for an image plot item.

This is intentionally separate from bec_widgets’ built-in mouse-tracking Crosshair (toggled from the image toolbar): that one follows the cursor and is purely a UI convenience. This crosshair never reacts to the mouse - it marks a single target position that is shown, hidden and moved entirely under program control (e.g. from xray_eye_align.py or any other BEC client via RPC), so it can be used to mark a reference position (such as a previously submitted alignment center) on the live view while the user works through subsequent steps.

Position is expressed in the same image/data coordinate system used by the widget’s ROIs (see XRayEye.submit), so values read back from omny_xray_gui.xval_x_* / yval_y_* can be passed in directly.

Methods

cleanup

is_visible

position

Current crosshair position as (x, y) in image/data coordinates.

set_position

Move the crosshair to (x, y) in image/data coordinates.

set_visible

Show or hide the crosshair without changing its position.

position() tuple[float, float][source]#

Current crosshair position as (x, y) in image/data coordinates.

set_position(x: float, y: float)[source]#

Move the crosshair to (x, y) in image/data coordinates.

set_visible(visible: bool)[source]#

Show or hide the crosshair without changing its position.