Commit 58501c8fa1f49bdc8aa94c7217f459287de4569d

Authored by tfmoraes
1 parent b4612866

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 562 self.pick.Pick(mouse_x, mouse_y, 0, render)
563 563  
564 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 567 slice_data.cursor.SetPosition(coord)
566 568 slice_data.cursor.SetEditionPosition(
567 569 self.get_coordinate_cursor_edition(slice_data))
... ... @@ -600,6 +602,8 @@ class Viewer(wx.Panel):
600 602 #self.interactor.SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT))
601 603  
602 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 607 slice_data.cursor.SetPosition(coord)
604 608 slice_data.cursor.SetEditionPosition(
605 609 self.get_coordinate_cursor_edition(slice_data))
... ...