ai_ct_scans.GUI.image_viewer module
- class ai_ct_scans.GUI.image_viewer.ImageViewer
Bases:
QLabel
Class to utilise the QLabel pixmap for displaying images in the GUI.
- pixmap
Current value of the displayed pixmap.
- Type
QPixmap
- paintEvent(event)
Paint the existing pixmap when the window changes.
- Parameters
event (QEvent) – automatically populated Qt event information.
- painter_element()
Create painter instance for rendering image.
- Returns
QPainter instance with correect scaling and rendering options.
- Return type
(QPainter)
- scale_factor()
Find a suitable scale factor.
- Returns
scale factor to fit image to window.
- Return type
(float)
- set_image(input_image, info_text=None, point=None, ellipse=None)
Convert the image for displaying within the ImageViewer as a QPixmap.
- Parameters
input_image (np.array) – image to display.
info_text (str) – information text string to display on corner of image.
point (list) – coordinates of a point to overlay on the image as [x, y], or None.
ellipse (dict) – dictionary describing ellipse to overlay on image.
- staticMetaObject = <PySide2.QtCore.QMetaObject object>