Interface

Contains the main GUI elements for PySeus. Format and tool specific GUI elements are defined in format and tool modules respectively.

Styling can be controlled in the Qt stylesheet under ui/style_dark.qss.

Main Window

class pyseus.ui.MainWindow(app)

Class representing the main window for PySeus.

add_menu_item(menu, title, callback, shortcut='')

Create a menu item.

app = None

Reference to the main application object.

console = None

Reference to the console sidebar widget.

info = None

Reference to the info sidebar widget.

meta = None

Reference to the meta sidebar widget.

resizeEvent(event)

Keep the viewport centered and adjust zoom on window resize.

setup_menu()

Setup the menu bar. Items in the Evaluate menu are created in the setup_menu function of tool classes.

show_status(message)

Display message in the status bar.

thumbs = None

Reference to the thumbs widget.

view = None

Reference to the view widget.

View Widget

class pyseus.ui.ViewWidget(app)

Widget providing an interactive viewport.

last_position = None

The last position, from which mouse events were processed.

mouseMoveEvent(event)

Handle pan, window and RoI functionality on mouse move.

mouseMoveEvent_over_image(event)

Handle value display functionality on mouse move over the image. Call mouseMoveEvent for pan, window and RoI functionality.

mousePressEvent(event)

Handle pan and window functionality on mouse button down.

mousePressEvent_over_image(event)

Handle RoI functionality on mouse button down over the image. Hands off contorl to mousePressEvent when appropriate.

mouseReleaseEvent(event)

Handle RoI functionality on mouse button up.

mouseReleaseEvent_over_image(event)

Call mouseReleaseEvent on mouse button up for RoI functionality.

mouse_action = None

The current action on mouse move. Can be ROI, WINDOW or PAN.

set(pixmap)

Display the image in pixmap.

wheelEvent(event)

Handle scroll wheel events in the viewport. Scroll - Change current slice up or down. Alt+Scroll - Change current scan up or down. Strg+Scroll - Zoom the current image in or out.

zoom(factor, relative=True)

Set the zoom level for the displayed image.

By default, the new zoom factor will be relative to the current zoom factor. If relative is set to False, factor will be used as the new zoom factor.

zoom_factor = None

The current zoom factor of the image.

zoom_fit()

Zoom the displayed image to fit the available viewport.

Thumbnails Widget

class pyseus.ui.ThumbsWidget(app)

Widget displaying scan thumbnails in a column.

add_thumb(pixmap)

Add the thumbnail in pixmap to the widget.

clear()

Remove all thumbnails.

minimumSizeHint()

Return widget size; width should be thumb_size + scrollbar_width or 0 if there are no thumbnails.