Commit 5af2a8ade4ff3536463cf52e9b11eec417d57217

Authored by okahilak
Committed by GitHub
1 parent 65fb4272
Exists in master

FIX: Neuronavigation not working when target not defined (#291)

- self.target was initialized in the wrong class, causing the neuronavigation
  to not work when a target is not defined. Move the initialization to the
  correct class.
- Due to a minor mistake in previous merge conflict resolution, UpdateTarget
  function was defined twice. Remove the redundant definition.

Co-authored-by: Olli-Pekka Kahilakoski <olli-pekka.kahilakoski@aalto.fi>
Showing 1 changed file with 1 additions and 4 deletions   Show diff stats
invesalius/gui/task_navigator.py
... ... @@ -314,6 +314,7 @@ class NeuronavigationPanel(wx.Panel):
314 314 self.current_coord = 0, 0, 0
315 315 self.trk_init = None
316 316 self.nav_status = False
  317 + self.target = None
317 318 self.trigger = None
318 319 self.trigger_state = False
319 320 self.obj_reg = None
... ... @@ -586,9 +587,6 @@ class NeuronavigationPanel(wx.Panel):
586 587 def UpdateACTData(self, data):
587 588 self.act_data = data
588 589  
589   - def UpdateTarget(self, coord):
590   - self.target = coord
591   -
592 590 def UpdateNavigationStatus(self, nav_status, vis_status):
593 591 self.nav_status = nav_status
594 592 if nav_status and (self.m_icp is not None):
... ... @@ -1734,7 +1732,6 @@ class TractographyPanel(wx.Panel):
1734 1732 self.brain_actor = None
1735 1733 self.n_peels = const.MAX_PEEL_DEPTH
1736 1734 self.p_old = np.array([[0., 0., 0.]])
1737   - self.target = None
1738 1735 self.tracts_run = None
1739 1736 self.trekker_cfg = const.TREKKER_CONFIG
1740 1737 self.nav_status = False
... ...