sksurgerydavinci.ui.gui module

GUI for AR Davinci

class sksurgerydavinci.ui.gui.UI(overlay_window)[source]

Bases: PySide2.QtWidgets.QWidget

User interface class, to combine vtk render view with buttons/sliders etc

add_crop_buttons()[source]

Add buttons to crop the video stream.

add_exit_button()[source]

Add a button to exit the program

add_opacity_slider()[source]

Create a QSlider that controls VTK model opactity

add_record_buttons()[source]

Add buttons to take screenshot and record video. Button callbacks should be implmenented in the Viewer class.

add_toggle_stereo_button()[source]

Add button to switch between L and R views

add_vtk_models(vtk_models)[source]

Add VTK models to the UI and vtk_overlay_window

Parameters:vtk_models (List of VTKSurfaceModels) – List of vtk models to add
add_vtk_overlay_window(overlay_window)[source]

Add the vtk_overlay_window to the UI layout.

Parameters:overlay_window – vtk_overlay_window
create_toggle_checkbox_for_model(model)[source]

Create a checkbox that will toggle on/off model visiblity.

Parameters:model – VTKSurfaceModel
Returns:QCheckBox
exit_signal = <PySide2.QtCore.Signal object>
on_exit_clicked()[source]

Close the application when the exit button has been clicked

set_all_opacities(opacity_percent)[source]

Set the opacity for all VTK models

Parameters:opacity_percent (int) – Target opacity value, in %
set_screen(screen)[source]

Link the widget to a particular screen

Parameters:screen – QGuiQpplication.screen() object
staticMetaObject = <PySide2.QtCore.QMetaObject object>