scikit-surgeryutils¶
Common Overlay Apps¶
Common use cases for vtk_overlay_window
-
class
sksurgeryutils.common_overlay_apps.
OverlayBaseWidget
(video_source, dims=None)[source]¶ Bases:
PySide2.QtWidgets.QWidget
Base class for applications that use vtk_overlay_window. The update() method should be implemented in the child class.
Parameters: - video_source – OpenCV compatible video source (int or filename)
- dims – size of video feed
-
add_vtk_models_from_dir
(directory)[source]¶ Add VTK models to the foreground. :param: directory, location of models
-
staticMetaObject
= <PySide2.QtCore.QMetaObject object>¶
-
class
sksurgeryutils.common_overlay_apps.
OverlayOnVideoFeed
(video_source, dims=None)[source]¶ Bases:
sksurgeryutils.common_overlay_apps.OverlayBaseWidget
Uses the acquired video feed as the background image, with no additional processing.
-
staticMetaObject
= <PySide2.QtCore.QMetaObject object>¶
-
-
class
sksurgeryutils.common_overlay_apps.
OverlayOnVideoFeedCropRecord
(video_source, output_filename=None, dims=None)[source]¶ Bases:
sksurgeryutils.common_overlay_apps.OverlayBaseWidget
- Add cropping of the incoming video feed, and the ability to
- record the vtk_overlay_window.
Parameters: - video_source – OpenCV compatible video source (int or filename)
- output_filename – Location of output video file when recording. If none specified, the current date/time is used as the filename.
-
on_record_start
()[source]¶ Start recording data on each frame update. It is expected that this will be triggered using a Qt signal e.g. from a button click. (see sksurgerydavinci.ui.Viewers for examples)
-
set_roi
()[source]¶ Crop the incoming video stream using ImageCropper. Function is depreciated due to moving to opencv-headless in sksurgeryvtk. I’ve left it in for the minute in case any one is using it without my knowlegde
-
staticMetaObject
= <PySide2.QtCore.QMetaObject object>¶
Misc Utilities¶
Various image utilities that might be useful in this package.
-
sksurgeryutils.utils.image_utils.
image_to_pixmap
(rgb_image)[source]¶ Converts an OpenCV image to a Qt pixmap.
Parameters: rgb_image – OpenCV image, 3 channel, RGB. Returns: QPixmap
Any useful utilities relating to displays/screens.