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