Image viewer

The scientific image viewing main window: a central image display with row/column profile and histogram LUT dock panels.

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 areaWidgetPurpose
CentralImageDisplaySubscribes to and automatically refreshes an image stream; can overlay a mask
TopLivePlot (row profile)Intensity profile of an image row
RightLivePlot (column profile)Intensity profile of an image column
LeftHistogramLUTWidgetHistogram 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:

PropertyMeaning
Viewer/minlevels / Viewer/maxlevelsHistogram display level range
Viewer/gradientFalse-color gradient preset (such as magma)
Viewer/tick_positionColor 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

MethodDescription
update_min_maxWrites the current histogram level range back to the properties (min/max levels)
get_tick_positionWalks the color scale ticks and returns them normalised to the 0–1 range
closeEventSaves 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).