pyanno4rt.visualization.visuals._ct_dose_slicing_window_pyqt

CT/Dose slicing window (PyQt).

Overview

Classes

ScrollBar

Scrollbar class.

SliceWidget

Slice widget class.

CtDoseSlicingWindowPyQt

CT/Dose slicing window (PyQt) class.

Classes

class pyanno4rt.visualization.visuals._ct_dose_slicing_window_pyqt.ScrollBar(minimum, maximum, initial_position, dose_cube)[source]

Bases: PyQt5.QtWidgets.QWidget

Scrollbar class.

This class provides a scrollbar, including the functional buttons to start/stop the autoplay, reset the view, and go to the first slice, as well as the label field with the changing dose slice statistics.

Parameters:
  • minimum (int) – Minimum value of the scrollbar.

  • maximum (int) – Maximum value of the scrollbar.

  • initial_position (int) – Initial position of the scrollbar.

  • dose_cube (ndarray) – Cubic array with the dose values.

dose_cube

See ‘Parameters’.

Type:

ndarray

label

Label field with the changing dose slice statistics.

Type:

string

start_button

Instance of the class QPushButton, which represents a functional button to start the autoplay mode.

Type:

object of class QPushButton

pause_button

Instance of the class QPushButton, which represents a functional button to pause the autoplay mode.

Type:

object of class QPushButton

reset_button

Instance of the class QPushButton, which represents a functional button to reset the visible slice back to the default.

Type:

object of class QPushButton

set_zero_button

Instance of the class QPushButton, which represents a functional button to set the visible slice to zero.

Type:

object of class QPushButton

slider

Instance of the class QScrollBar, which creates a slider/scrollbar to navigate through the slices.

Type:

object of class QScrollBar

slice_number

Number of the slice for the update of labels and images.

Type:

int

Overview

Methods

set_label(slice_number)

Set the slice number and the label with the dose statistics.

Members

set_label(slice_number)[source]

Set the slice number and the label with the dose statistics.

class pyanno4rt.visualization.visuals._ct_dose_slicing_window_pyqt.SliceWidget(label, ct_cube, dose_cube, segment_masks, segment_colors, rotations)[source]

Bases: PyQt5.QtWidgets.QWidget

Slice widget class.

This class provides a slice widget, including the widget label, the graphics window showing the sliced array, and the scrollbar with some functionality.

Parameters:
  • label (string) – Label for the slice widget.

  • ct_cube (ndarray) – Cubic array with the CT values.

  • dose_cube (ndarray) – Cubic array with the dose values.

  • segment_masks (tuple) – Binary masks as indicators for the segment locations.

  • segment_colors (tuple) – Colors for the segment contours.

  • rotations (int) – Number of 90-degree rotations of the CT/dose cubes.

ct_cube

See ‘Parameters’.

Type:

ndarray

dose_cube

See ‘Parameters’.

Type:

ndarray

dose_cube_with_nan

Cubic array with the dose values, where zeros are replaced with nan.

Type:

ndarray

segment_masks

See ‘Parameters’.

Type:

tuple

ct_image

Instance of the class ImageItem, which displays the CT image.

Type:

object of class ImageItem

dose_image

Instance of the class ImageItem, which displays the dose image.

Type:

object of class ImageItem

dose_contours

Isodose contours for different levels.

Type:

list

segment_contours

Isolevel contours for different segments.

Type:

list

scrollbar

Instance of the class ScrollBar, which enables scrolling through the image slices with a horizontal bar-style element.

Type:

object of class ScrollBar

initial_position

Initial position of the scrollbar.

Type:

int

timer

Instance of the class QTimer, which periodically performs slice increments to allow for the autoplay mode.

Type:

object of class QTimer

current_position

Current position of the scrollbar.

Type:

int

Overview

Methods

update_images()

Update the images when scrolling.

increment_slice()

Increment the slice number.

start_autoplay()

Start the autoplay mode.

end_autoplay()

End the autoplay mode.

reset_scroll_position()

Reset the scrollbar to the initial position.

set_scroll_to_zero()

Set the scrollbar to the zero position.

Members

update_images()[source]

Update the images when scrolling.

increment_slice()[source]

Increment the slice number.

start_autoplay()[source]

Start the autoplay mode.

end_autoplay()[source]

End the autoplay mode.

reset_scroll_position()[source]

Reset the scrollbar to the initial position.

set_scroll_to_zero()[source]

Set the scrollbar to the zero position.

class pyanno4rt.visualization.visuals._ct_dose_slicing_window_pyqt.CtDoseSlicingWindowPyQt[source]

Bases: PyQt5.QtWidgets.QMainWindow

CT/Dose slicing window (PyQt) class.

This class provides an interactive plot of the patient’s CT/dose slices on the axial, sagittal and coronal axes, including the segment contours, dose level curves, and a scrolling and autoplay functionality.

category

Plot category for assignment to the button groups in the visual interface.

Type:

string

name

Attribute name of the classes’ instance in the visual interface.

Type:

string

label

Label of the plot button in the visual interface.

Type:

string

Overview

Methods

view()

Open the full-screen view on the CT/dose slicing window.

Members

view()[source]

Open the full-screen view on the CT/dose slicing window.