Image viewer
Overview
quatm/GUI/entries/image_group.py provides the image viewing window (ImageWindow): the central
ImageDisplay is the main widget, with panels such as the row/column profiles and the
histogram LUT docked around it, for real-time monitoring and analysis of imaging experiments.
Layout
| Dock area | Widget | Purpose |
|---|---|---|
| Central | ImageDisplay | Subscribes to and automatically refreshes an image stream; can overlay a mask |
| Top | LivePlot (row profile) | Intensity profile of an image row |
| Right | LivePlot (column profile) | Intensity profile of an image column |
| Left | HistogramLUTWidget | Histogram color scale: level range and false-color mapping |
Each profile plot is a LivePlot container in which an UpdatingPlot subscribes to the corresponding
data stream and refreshes in real time (see Live plotting for details).
Display parameter persistence
Display parameters are stored in the Viewer/ namespace of the property database; they are
restored from the properties at construction time and saved automatically on close:
| Property | Meaning |
|---|---|
Viewer/minlevels / Viewer/maxlevels | Histogram display level range |
Viewer/gradient | False-color gradient preset (such as magma) |
Viewer/tick_position | Color scale tick positions (0–1 normalised list) |
After dragging the histogram levels or the color scale ticks, the current values are written back to
the properties through update_min_max and get_tick_position respectively, and closeEvent saves
the view range and ticks uniformly before the window closes.
Methods
| Method | Description |
|---|---|
update_min_max | Writes the current histogram level range back to the properties (min/max levels) |
get_tick_position | Walks the color scale ticks and returns them normalised to the 0–1 range |
closeEvent | Saves the view range and color scale ticks to the properties before closing |
Usage
from quatm.GUI.entries.image_group import ImageWindow
win = ImageWindow(name="absorption_imaging") # standalone top-level window; parent may be omitted
win.show()
This window is often started as a standalone process, but can also be embedded in other interfaces
as a BMainWindow instance. The image stream and the row/column profile streams are subscribed from
the context menus of the individual sub-panels (image display / profile plots).