Commit 162a620aa3075a3112c71afcf1d36bb9958d0d06

Authored by Thiago Franco de Moraes
1 parent 8b08a7ca

Remove unnecessary prints

invesalius/data/measures.py
@@ -170,20 +170,14 @@ class MeasurementManager(object): @@ -170,20 +170,14 @@ class MeasurementManager(object):
170 170
171 to_remove = False 171 to_remove = False
172 if self.current is None: 172 if self.current is None:
173 - print "To Create"  
174 to_create = True 173 to_create = True
175 elif self.current[0].location != location: 174 elif self.current[0].location != location:
176 - print "To Create"  
177 - print "To Remove"  
178 to_create = True 175 to_create = True
179 to_remove = True 176 to_remove = True
180 elif self.current[0].slice_number != slice_number: 177 elif self.current[0].slice_number != slice_number:
181 - print "To Create"  
182 - print "To Remove"  
183 to_create = True 178 to_create = True
184 to_remove = True 179 to_remove = True
185 else: 180 else:
186 - print "To not Create"  
187 to_create = False 181 to_create = False
188 182
189 if to_create: 183 if to_create:
@@ -198,7 +192,6 @@ class MeasurementManager(object): @@ -198,7 +192,6 @@ class MeasurementManager(object):
198 else: 192 else:
199 mr = AngularMeasure(m.colour, representation) 193 mr = AngularMeasure(m.colour, representation)
200 if to_remove: 194 if to_remove:
201 - print "---To REMOVE"  
202 # actors = self.current[1].GetActors() 195 # actors = self.current[1].GetActors()
203 # slice_number = self.current[0].slice_number 196 # slice_number = self.current[0].slice_number
204 # Publisher.sendMessage(('Remove actors ' + str(self.current[0].location)), 197 # Publisher.sendMessage(('Remove actors ' + str(self.current[0].location)),
@@ -251,7 +244,6 @@ class MeasurementManager(object): @@ -251,7 +244,6 @@ class MeasurementManager(object):
251 244
252 def _change_measure_point_pos(self, pubsub_evt): 245 def _change_measure_point_pos(self, pubsub_evt):
253 index, npoint, pos = pubsub_evt.data 246 index, npoint, pos = pubsub_evt.data
254 - print index, npoint, pos  
255 m, mr = self.measures[index] 247 m, mr = self.measures[index]
256 x, y, z = pos 248 x, y, z = pos
257 if npoint == 0: 249 if npoint == 0:
@@ -322,7 +314,6 @@ class MeasurementManager(object): @@ -322,7 +314,6 @@ class MeasurementManager(object):
322 314
323 m, mr = self.current 315 m, mr = self.current
324 if not mr.IsComplete(): 316 if not mr.IsComplete():
325 - print "---To REMOVE"  
326 idx = self.measures._list_measures.index((m, mr)) 317 idx = self.measures._list_measures.index((m, mr))
327 self.measures.remove((m, mr)) 318 self.measures.remove((m, mr))
328 Publisher.sendMessage("Remove GUI measurement", idx) 319 Publisher.sendMessage("Remove GUI measurement", idx)
@@ -477,7 +468,6 @@ class LinearMeasure(object): @@ -477,7 +468,6 @@ class LinearMeasure(object):
477 if not representation: 468 if not representation:
478 representation = CirclePointRepresentation(colour) 469 representation = CirclePointRepresentation(colour)
479 self.representation = representation 470 self.representation = representation
480 - print colour  
481 471
482 def IsComplete(self): 472 def IsComplete(self):
483 """ 473 """
@@ -671,7 +661,6 @@ class AngularMeasure(object): @@ -671,7 +661,6 @@ class AngularMeasure(object):
671 if not representation: 661 if not representation:
672 representation = CirclePointRepresentation(colour) 662 representation = CirclePointRepresentation(colour)
673 self.representation = representation 663 self.representation = representation
674 - print colour  
675 664
676 def IsComplete(self): 665 def IsComplete(self):
677 return not self.point_actor3 is None 666 return not self.point_actor3 is None
@@ -762,8 +751,6 @@ class AngularMeasure(object): @@ -762,8 +751,6 @@ class AngularMeasure(object):
762 line.AddInputConnection(line2.GetOutputPort()) 751 line.AddInputConnection(line2.GetOutputPort())
763 line.AddInputConnection(arc.GetOutputPort()) 752 line.AddInputConnection(arc.GetOutputPort())
764 753
765 - print line  
766 -  
767 c = vtk.vtkCoordinate() 754 c = vtk.vtkCoordinate()
768 c.SetCoordinateSystemToWorld() 755 c.SetCoordinateSystemToWorld()
769 756
@@ -894,8 +881,6 @@ class AngularMeasure(object): @@ -894,8 +881,6 @@ class AngularMeasure(object):
894 """ 881 """
895 v1 = [j-i for i,j in zip(self.points[0], self.points[1])] 882 v1 = [j-i for i,j in zip(self.points[0], self.points[1])]
896 v2 = [j-i for i,j in zip(self.points[2], self.points[1])] 883 v2 = [j-i for i,j in zip(self.points[2], self.points[1])]
897 - #print vtk.vtkMath.Normalize(v1)  
898 - #print vtk.vtkMath.Normalize(v2)  
899 try: 884 try:
900 cos = vtk.vtkMath.Dot(v1, v2)/(vtk.vtkMath.Norm(v1)*vtk.vtkMath.Norm(v2)) 885 cos = vtk.vtkMath.Dot(v1, v2)/(vtk.vtkMath.Norm(v1)*vtk.vtkMath.Norm(v2))
901 except ZeroDivisionError: 886 except ZeroDivisionError:
invesalius/data/viewer_slice.py
@@ -1338,11 +1338,9 @@ class Viewer(wx.Panel): @@ -1338,11 +1338,9 @@ class Viewer(wx.Panel):
1338 self.slice_data.renderer.ResetCameraClippingRange() 1338 self.slice_data.renderer.ResetCameraClippingRange()
1339 1339
1340 def UpdateRender(self, evt): 1340 def UpdateRender(self, evt):
1341 - print "Updating viewer", self.orientation  
1342 self.interactor.Render() 1341 self.interactor.Render()
1343 1342
1344 def UpdateCanvas(self, evt=None): 1343 def UpdateCanvas(self, evt=None):
1345 - print "Updating viewer and canvas", self.orientation  
1346 self.canvas.modified = True 1344 self.canvas.modified = True
1347 self.interactor.Render() 1345 self.interactor.Render()
1348 1346