diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index cfa7f05..8e51c47 100644 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -570,7 +570,6 @@ class Viewer(wx.Panel): ux, uy, uz = position[:3] px, py = self.get_slice_pixel_coord_by_world_pos(ux, uy, uz) coord = self.calcultate_scroll_position(px, py) - print(position, coord) self.cross.SetFocalPoint((ux, uy, uz)) self.ScrollSlice(coord) diff --git a/invesalius/data/viewer_volume.py b/invesalius/data/viewer_volume.py index ce48e68..6988da5 100644 --- a/invesalius/data/viewer_volume.py +++ b/invesalius/data/viewer_volume.py @@ -283,6 +283,7 @@ class Viewer(wx.Panel): Publisher.subscribe(self.UpdateCameraBallPosition, 'Update cross position') + Publisher.subscribe(self.SetCrossFocalPoint, 'Set cross focal point') Publisher.subscribe(self._check_ball_reference, 'Enable style') Publisher.subscribe(self._uncheck_ball_reference, 'Disable style') @@ -1200,6 +1201,9 @@ class Viewer(wx.Panel): self.ren.AddActor(self.ball_actor) + def SetCrossFocalPoint(self, position): + self.UpdateCameraBallPosition(None, position) + def UpdateCameraBallPosition(self, arg, position): coord_flip = bases.flip_x_m(position[:3])[:3, 0] self.ball_actor.SetPosition(coord_flip) -- libgit2 0.21.2