Commit d1b042b45542443fa4b3df520f9b793c826b35b1

Authored by tfmoraes
1 parent c48845ff

ENH: It was missing some changes in the last commit

Showing 1 changed file with 5 additions and 3 deletions   Show diff stats
invesalius/data/co_registration.py
1 import threading 1 import threading
  2 +
2 import serial 3 import serial
  4 +import wx
3 import wx.lib.pubsub as ps 5 import wx.lib.pubsub as ps
  6 +
4 from numpy import * 7 from numpy import *
5 from math import sqrt 8 from math import sqrt
6 from time import sleep 9 from time import sleep
7 -import project  
8 10
9 class Corregister(threading.Thread): 11 class Corregister(threading.Thread):
10 12
@@ -52,12 +54,12 @@ class Corregister(threading.Thread): @@ -52,12 +54,12 @@ class Corregister(threading.Thread):
52 tracker = matrix([[trck[0]], [trck[1]], [trck[2]]]) 54 tracker = matrix([[trck[0]], [trck[1]], [trck[2]]])
53 img = self.q1 + (self.Minv*self.N)*(tracker - self.q2) 55 img = self.q1 + (self.Minv*self.N)*(tracker - self.q2)
54 coord = [float(img[0]), float(img[1]), float(img[2])] 56 coord = [float(img[0]), float(img[1]), float(img[2])]
55 - ps.Publisher().sendMessage('Co-registered Points', coord)  
56 coord_cam = float(img[0]), float(img[1]), float(img[2]) 57 coord_cam = float(img[0]), float(img[1]), float(img[2])
57 ps.Publisher().sendMessage('Set ball reference position based on bound', coord_cam) 58 ps.Publisher().sendMessage('Set ball reference position based on bound', coord_cam)
58 ps.Publisher().sendMessage('Set camera in volume', coord_cam) 59 ps.Publisher().sendMessage('Set camera in volume', coord_cam)
59 wx.CallAfter(ps.Publisher().sendMessage, 'Render volume viewer') 60 wx.CallAfter(ps.Publisher().sendMessage, 'Render volume viewer')
60 wx.CallAfter(ps.Publisher().sendMessage, 'Co-registered Points', coord) 61 wx.CallAfter(ps.Publisher().sendMessage, 'Co-registered Points', coord)
61 - sleep(0.05) 62 + sleep(0.005)
  63 +
62 if self._pause_: 64 if self._pause_:
63 return 65 return