Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

228 interaction vtkoverlaywindow #229

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-12]
python-ver: [3.8, 3.9]
experimental: [false]
include:
- python-ver: '3.10'
os: ubuntu-latest
experimental: true
- python-ver: '3.10'
os: macos-latest
os: macos-12
experimental: true
- python-ver: '3.10'
os: windows-latest
Expand All @@ -25,7 +25,7 @@ jobs:
os: ubuntu-latest
experimental: true
- python-ver: 3.11
os: macos-latest
os: macos-12
experimental: true
- python-ver: 3.11
os: windows-latest
Expand Down
12 changes: 11 additions & 1 deletion sksurgeryvtk/widgets/vtk_overlay_window.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# pylint: disable=too-many-instance-attributes, no-name-in-module
# pylint: disable=too-many-instance-attributes, no-name-in-module, too-many-statements
# pylint:disable=super-with-arguments, too-many-arguments, line-too-long, too-many-public-methods

"""
Expand Down Expand Up @@ -94,6 +94,8 @@ def __init__(
video_in_layer_2=False, # For backwards compatibility, prior to 3rd Feb 2024.
layer_2_video_mask=None, # For masking in Layer 3
use_depth_peeling=True, # Historically, has defaulted to true.
layer_1_interactive=True, # For backwards compatibility, prior to 3rd Feb 2024.
layer_3_interactive=False # For backwards compatibility, prior to 3rd Feb 2024.
):
"""
Constructs a new VTKOverlayWindow.
Expand Down Expand Up @@ -180,6 +182,10 @@ def __init__(
self.layer_1_renderer = vtk.vtkRenderer()
self.layer_1_renderer.SetLayer(1)
self.layer_1_renderer.LightFollowCameraOn()
if layer_1_interactive:
self.layer_1_renderer.InteractiveOn()
else:
self.layer_1_renderer.InteractiveOff()

# Create and setup layer 2 (masked video) renderer.
self.layer_2_image_actor = vtk.vtkImageActor()
Expand All @@ -196,6 +202,10 @@ def __init__(
self.layer_3_renderer = vtk.vtkRenderer()
self.layer_3_renderer.SetLayer(3)
self.layer_3_renderer.LightFollowCameraOn()
if layer_3_interactive:
self.layer_3_renderer.InteractiveOn()
else:
self.layer_3_renderer.InteractiveOff()

# Create and setup layer 4 (Overlay's, like text annotations) renderer.
self.layer_4_renderer = vtk.vtkRenderer()
Expand Down
Loading