Commit 58501c8fa1f49bdc8aa94c7217f459287de4569d
1 parent
b4612866
Exists in
master
and in
67 other branches
Setting the cursor coordinates to world coordinate of the center of pixel slice
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
invesalius/data/viewer_slice.py
@@ -562,6 +562,8 @@ class Viewer(wx.Panel): | @@ -562,6 +562,8 @@ class Viewer(wx.Panel): | ||
562 | self.pick.Pick(mouse_x, mouse_y, 0, render) | 562 | self.pick.Pick(mouse_x, mouse_y, 0, render) |
563 | 563 | ||
564 | coord = self.get_coordinate_cursor() | 564 | coord = self.get_coordinate_cursor() |
565 | + position = self.slice_data.actor.GetInput().FindPoint(coord) | ||
566 | + coord = self.slice_data.actor.GetInput().GetPoint(position) | ||
565 | slice_data.cursor.SetPosition(coord) | 567 | slice_data.cursor.SetPosition(coord) |
566 | slice_data.cursor.SetEditionPosition( | 568 | slice_data.cursor.SetEditionPosition( |
567 | self.get_coordinate_cursor_edition(slice_data)) | 569 | self.get_coordinate_cursor_edition(slice_data)) |
@@ -600,6 +602,8 @@ class Viewer(wx.Panel): | @@ -600,6 +602,8 @@ class Viewer(wx.Panel): | ||
600 | #self.interactor.SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT)) | 602 | #self.interactor.SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT)) |
601 | 603 | ||
602 | coord = self.get_coordinate_cursor() | 604 | coord = self.get_coordinate_cursor() |
605 | + position = self.slice_data.actor.GetInput().FindPoint(coord) | ||
606 | + coord = self.slice_data.actor.GetInput().GetPoint(position) | ||
603 | slice_data.cursor.SetPosition(coord) | 607 | slice_data.cursor.SetPosition(coord) |
604 | slice_data.cursor.SetEditionPosition( | 608 | slice_data.cursor.SetEditionPosition( |
605 | self.get_coordinate_cursor_edition(slice_data)) | 609 | self.get_coordinate_cursor_edition(slice_data)) |