Commit aee6346daee6b49b0f9d1a9a53013d2a14331f7f

Authored by okahilak
Committed by GitHub
1 parent 7f995654
Exists in master

MOD: Minor changes to function names in task_navigator.py (#312)

Showing 1 changed file with 8 additions and 9 deletions   Show diff stats
invesalius/gui/task_navigator.py
... ... @@ -820,8 +820,8 @@ class NeuronavigationPanel(wx.Panel):
820 820 Publisher.subscribe(self.UpdateACTData, 'Update ACT data')
821 821 Publisher.subscribe(self.UpdateNavigationStatus, 'Navigation status')
822 822 Publisher.subscribe(self.UpdateTarget, 'Update target')
823   - Publisher.subscribe(self.onStartNavigation, 'Start navigation')
824   - Publisher.subscribe(self.onStopNavigation, 'Stop navigation')
  823 + Publisher.subscribe(self.OnStartNavigation, 'Start navigation')
  824 + Publisher.subscribe(self.OnStopNavigation, 'Stop navigation')
825 825  
826 826 def LoadImageFiducials(self, marker_id, coord):
827 827 fiducial = self.GetFiducialByAttribute(const.IMAGE_FIDUCIALS, 'label', marker_id)
... ... @@ -978,7 +978,7 @@ class NeuronavigationPanel(wx.Panel):
978 978 fiducial_name = const.TRACKER_FIDUCIALS[n]['fiducial_name']
979 979 Publisher.sendMessage('Set tracker fiducial', fiducial_name=fiducial_name)
980 980  
981   - def onStopNavigation(self):
  981 + def OnStopNavigation(self):
982 982 select_tracker_elem = self.select_tracker_elem
983 983 choice_ref = self.choice_ref
984 984  
... ... @@ -991,11 +991,10 @@ class NeuronavigationPanel(wx.Panel):
991 991 for btn_c in self.btns_set_fiducial:
992 992 btn_c.Enable(True)
993 993  
994   - def UpdateFiducialRegistrationError(self):
  994 + def CheckFiducialRegistrationError(self):
995 995 self.navigation.UpdateFiducialRegistrationError(self.tracker)
996 996 fre, fre_ok = self.navigation.GetFiducialRegistrationError(self.icp)
997 997  
998   -
999 998 self.txtctrl_fre.SetValue(str(round(fre, 2)))
1000 999 if fre_ok:
1001 1000 self.txtctrl_fre.SetBackgroundColour('GREEN')
... ... @@ -1004,7 +1003,7 @@ class NeuronavigationPanel(wx.Panel):
1004 1003  
1005 1004 return fre_ok
1006 1005  
1007   - def onStartNavigation(self):
  1006 + def OnStartNavigation(self):
1008 1007 select_tracker_elem = self.select_tracker_elem
1009 1008 choice_ref = self.choice_ref
1010 1009  
... ... @@ -1028,7 +1027,7 @@ class NeuronavigationPanel(wx.Panel):
1028 1027  
1029 1028 self.navigation.StartNavigation(self.tracker)
1030 1029  
1031   - if not self.UpdateFiducialRegistrationError():
  1030 + if not self.CheckFiducialRegistrationError():
1032 1031 # TODO: Exhibit FRE in a warning dialog and only starts navigation after user clicks ok
1033 1032 print("WARNING: Fiducial registration error too large.")
1034 1033  
... ... @@ -1038,7 +1037,7 @@ class NeuronavigationPanel(wx.Panel):
1038 1037 self.checkbox_icp.SetValue(True)
1039 1038 # Update FRE once more after starting the navigation, due to the optional use of ICP,
1040 1039 # which improves FRE.
1041   - self.UpdateFiducialRegistrationError()
  1040 + self.CheckFiducialRegistrationError()
1042 1041  
1043 1042 def OnNavigate(self, evt, btn_nav):
1044 1043 select_tracker_elem = self.select_tracker_elem
... ... @@ -1067,7 +1066,7 @@ class NeuronavigationPanel(wx.Panel):
1067 1066  
1068 1067 def OnCheckboxICP(self, evt, ctrl):
1069 1068 self.icp.SetICP(self.navigation, ctrl.GetValue())
1070   - self.UpdateFiducialRegistrationError()
  1069 + self.CheckFiducialRegistrationError()
1071 1070  
1072 1071 def OnCloseProject(self):
1073 1072 self.ResetUI()
... ...