Commit 6dc0fd02d7cc8e012babfe6ced413c3b181e9469

Authored by Thiago Franco de Moraes
1 parent 3b3e3f88
Exists in master

Removed prints and convert a print to python3

invesalius/data/editor.py
@@ -117,9 +117,7 @@ class Editor: @@ -117,9 +117,7 @@ class Editor:
117 # a = (int(self.txtThresI.GetValue()), int(self.txtThresF.GetValue())) 117 # a = (int(self.txtThresI.GetValue()), int(self.txtThresF.GetValue()))
118 # self.editor.SetOperationType(op, a) 118 # self.editor.SetOperationType(op, a)
119 wx, wy, wz = self.From3dToImagePixel(pos, (x, y, z)) 119 wx, wy, wz = self.From3dToImagePixel(pos, (x, y, z))
120 - print "Comecei"  
121 self.DoOperation(wx, wy, wz) 120 self.DoOperation(wx, wy, wz)
122 - print "Terminei"  
123 Publisher.sendMessage('Update images', self.image) 121 Publisher.sendMessage('Update images', self.image)
124 Publisher.sendMessage('Update viewer', None) 122 Publisher.sendMessage('Update viewer', None)
125 123
@@ -135,7 +133,6 @@ class Editor: @@ -135,7 +133,6 @@ class Editor:
135 """ 133 """
136 x, y, z = pPos 134 x, y, z = pPos
137 bounds = self.actor.GetBounds() 135 bounds = self.actor.GetBounds()
138 - print bounds  
139 136
140 #c = vtk.vtkCoordinate() 137 #c = vtk.vtkCoordinate()
141 #c.SetCoordinateSystemToWorld() 138 #c.SetCoordinateSystemToWorld()
@@ -228,15 +225,11 @@ class Editor: @@ -228,15 +225,11 @@ class Editor:
228 cursor = self.cursor 225 cursor = self.cursor
229 b = [0,0,0,0,0,0] 226 b = [0,0,0,0,0,0]
230 self.actor.GetDisplayBounds(b) 227 self.actor.GetDisplayBounds(b)
231 - print "To Paint", xc, yc, zc  
232 - print "Bounds", b  
233 - print "dimensions", self.image.GetDimensions()  
234 xs, ys, zs = self.image.GetSpacing() 228 xs, ys, zs = self.image.GetSpacing()
235 try: 229 try:
236 zs = (b[-1]-b[-2]) / self.image.GetDimensions()[2] 230 zs = (b[-1]-b[-2]) / self.image.GetDimensions()[2]
237 except ZeroDivisionError: 231 except ZeroDivisionError:
238 pass 232 pass
239 - print xs, ys, zs  
240 if self.orientation == AXIAL: 233 if self.orientation == AXIAL:
241 o = lambda x, y: (xc + x, y + yc, zc) 234 o = lambda x, y: (xc + x, y + yc, zc)
242 elif self.orientation == CORONAL: 235 elif self.orientation == CORONAL:
invesalius/data/orientation.py
@@ -34,7 +34,6 @@ class Orientation(object): @@ -34,7 +34,6 @@ class Orientation(object):
34 extent = self.image.GetWholeExtent() 34 extent = self.image.GetWholeExtent()
35 35
36 if orientation == AXIAL: 36 if orientation == AXIAL:
37 - print "AXIAL"  
38 cam.SetFocalPoint(0, 0, 0) 37 cam.SetFocalPoint(0, 0, 0)
39 cam.SetPosition(0, 0, 1) 38 cam.SetPosition(0, 0, 1)
40 cam.ComputeViewPlaneNormal() 39 cam.ComputeViewPlaneNormal()
@@ -44,7 +43,6 @@ class Orientation(object): @@ -44,7 +43,6 @@ class Orientation(object):
44 ys = extent[3] - extent[2] + 1 43 ys = extent[3] - extent[2] + 1
45 44
46 elif orientation == CORONAL: 45 elif orientation == CORONAL:
47 - print "Coronal"  
48 cam.SetFocalPoint(0, 0, 0) 46 cam.SetFocalPoint(0, 0, 0)
49 cam.SetPosition(0, -1, 0) 47 cam.SetPosition(0, -1, 0)
50 cam.ComputeViewPlaneNormal() 48 cam.ComputeViewPlaneNormal()
@@ -54,7 +52,6 @@ class Orientation(object): @@ -54,7 +52,6 @@ class Orientation(object):
54 ys = extent[5] - extent[4] + 1 52 ys = extent[5] - extent[4] + 1
55 53
56 elif orientation == SAGITAL: 54 elif orientation == SAGITAL:
57 - print "Sagital"  
58 cam.SetFocalPoint(0, 0, 0) 55 cam.SetFocalPoint(0, 0, 0)
59 cam.SetPosition(1, 0, 0) 56 cam.SetPosition(1, 0, 0)
60 cam.ComputeViewPlaneNormal() 57 cam.ComputeViewPlaneNormal()
invesalius/data/volume_widgets.py
@@ -65,7 +65,7 @@ class Plane(): @@ -65,7 +65,7 @@ class Plane():
65 else: 65 else:
66 self.Update() 66 self.Update()
67 if self.widget.GetEnabled(): 67 if self.widget.GetEnabled():
68 - print "send signal - update slice info in panel and in 2d" 68 + print("send signal - update slice info in panel and in 2d")
69 69
70 70
71 def SetInput(self, imagedata): 71 def SetInput(self, imagedata):