Commit 1ba56fa282f3f535426ac74b3f0c15d887a91aa8

Authored by Renan
1 parent 85f1368a
Exists in master

FIX: ICP get coordinates

invesalius/gui/dialogs.py
... ... @@ -3647,8 +3647,7 @@ class ICPCorregistrationDialog(wx.Dialog):
3647 3647 import invesalius.project as prj
3648 3648  
3649 3649 self.m_change = nav_prop[0]
3650   - self.tracker_id = nav_prop[1]
3651   - self.trk_init = nav_prop[2]
  3650 + self.tracker = nav_prop[1]
3652 3651 self.obj_ref_id = 2
3653 3652 self.obj_name = None
3654 3653 self.obj_actor = None
... ... @@ -3804,7 +3803,7 @@ class ICPCorregistrationDialog(wx.Dialog):
3804 3803 self.interactor.Render()
3805 3804  
3806 3805 def GetCurrentCoord(self):
3807   - coord_raw = dco.TrackerCoordinates.GetCoordinates()
  3806 + coord_raw, markers_flag = self.tracker.TrackerCoordinates.GetCoordinates()
3808 3807 coord, _ = dcr.corregistrate_dynamic((self.m_change, 0), coord_raw, const.DEFAULT_REF_MODE, [None, None])
3809 3808 return coord[:3]
3810 3809  
... ...
invesalius/navigation/icp.py
... ... @@ -48,7 +48,7 @@ class ICP():
48 48 def OnICP(self, navigation, tracker, m_change):
49 49 ref_mode_id = navigation.GetReferenceMode()
50 50  
51   - dialog = dlg.ICPCorregistrationDialog(nav_prop=(m_change, tracker.tracker_id, tracker.trk_init, ref_mode_id))
  51 + dialog = dlg.ICPCorregistrationDialog(nav_prop=(m_change, tracker, ref_mode_id))
52 52  
53 53 if dialog.ShowModal() == wx.ID_OK:
54 54 m_icp, point_coord, transformed_points, prev_error, final_error = dialog.GetValue()
... ...