API Reference

Generated from docstrings. Requires pip install -e . and a doc build (cd docs && make html).

Plugins

ROI Manager

ROI Plugin - mirrors the line plugin pattern exactly.

All graphics items live in the QGraphicsScene (scene coords throughout). pg.RectROI is placed in the scene, so its pos/size are scene coords, and its built-in handles work without any coordinate-system gymnastics.

Interaction:
  • Toggle ON → crosshair cursor, wait for draw.

  • Press & drag → live rectangle preview.

  • Release → ROI finalised; PyQtGraph handles active for reshape/move.

  • Toggle OFF → ROI erased.

class pystream.plugins.roi.ROIManager(image_view: pyqtgraph.ImageView, stats_label: PyQt5.QtWidgets.QLabel, logger: Logger | None = None, *, handle_size: int = 10, roi_pen_width: int = 2, show_dimensions: bool = True)[source]
cleanup()[source]
get_roi_bounds() dict | None[source]
get_roi_data(image: numpy.ndarray | None = None) numpy.ndarray | None[source]
reset()[source]
set_roi_bounds(x, y, width, height)[source]
toggle(state)[source]
update_stats(image: numpy.ndarray)[source]

Line Profile

Line measurement tool.

Interaction:
  • Toggle ON → click once to place the start point.

  • Move mouse → live preview of the line (start → cursor).

  • Click again → finalize the end point; line is drawn.

  • Drag center → move the whole line.

  • Drag endpoint → reposition that endpoint (live update).

  • Toggle OFF → line is erased.

Physical length is computed using the pixel sizes stored in the two scale bars (scale_bar_1 for X, scale_bar_2 for Y).

class pystream.plugins.line.LineProfileManager(image_view: pyqtgraph.ImageView, stats_label: PyQt5.QtWidgets.QLabel, logger: Logger | None = None)[source]
cleanup()[source]
reset()[source]
set_scalebar_manager(scalebar_manager)[source]
toggle(state)[source]
update_stats(image: numpy.ndarray)[source]

bl32ID Beamline

Mosaic Alignment

SoftBPM

Detector Control

QGMax

AutoCenter

Rotation Axis

DataMap