Skip to content

Commit

Permalink
Enable the skeleton resize mode in VR
Browse files Browse the repository at this point in the history
  • Loading branch information
zjp committed Oct 4, 2023
1 parent 07c3d91 commit 9065b7f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/bundles/dicom/src/ui/segmentation_mouse_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ def __init__(self, session):
MouseMode.__init__(self, session)
self.segmentation_tool = None

def enable(self):
self.segmentation_tool = self._find_segmentation_tool()


def _find_segmentation_tool(self):
for tool in self.session.tools:
if isinstance(tool, SegmentationTool):
Expand All @@ -158,3 +162,8 @@ def wheel(self, event):
self.segmentation_tool.segmentation_sphere.radius += 1
elif d < 0:
self.segmentation_tool.segmentation_sphere.radius -= 1

def vr_motion(self, event):
c = self.segmentation_tool.segmentation_sphere.scene_position.origin()
delta_xyz = event.motion*c - c
self.segmentation_tool.move_sphere(delta_xyz)

0 comments on commit 9065b7f

Please sign in to comment.