From 58501c8fa1f49bdc8aa94c7217f459287de4569d Mon Sep 17 00:00:00 2001 From: tfmoraes Date: Tue, 3 May 2011 18:29:13 +0000 Subject: [PATCH] Setting the cursor coordinates to world coordinate of the center of pixel slice --- invesalius/data/viewer_slice.py | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index 992e25a..a7acef4 100755 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -562,6 +562,8 @@ class Viewer(wx.Panel): self.pick.Pick(mouse_x, mouse_y, 0, render) coord = self.get_coordinate_cursor() + position = self.slice_data.actor.GetInput().FindPoint(coord) + coord = self.slice_data.actor.GetInput().GetPoint(position) slice_data.cursor.SetPosition(coord) slice_data.cursor.SetEditionPosition( self.get_coordinate_cursor_edition(slice_data)) @@ -600,6 +602,8 @@ class Viewer(wx.Panel): #self.interactor.SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT)) coord = self.get_coordinate_cursor() + position = self.slice_data.actor.GetInput().FindPoint(coord) + coord = self.slice_data.actor.GetInput().GetPoint(position) slice_data.cursor.SetPosition(coord) slice_data.cursor.SetEditionPosition( self.get_coordinate_cursor_edition(slice_data)) -- libgit2 0.21.2