Commit 93778ed404d1d98fcfa2662dd06b88c615a2cecb

Authored by tfmoraes
1 parent a9c7cd4b

ENH: A better position to slice number

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
invesalius/data/slice_data.py
@@ -41,19 +41,19 @@ class SliceData(object): @@ -41,19 +41,19 @@ class SliceData(object):
41 text_actor = vtk.vtkTextActor() 41 text_actor = vtk.vtkTextActor()
42 text_actor.SetInput("%d" % self.number) 42 text_actor.SetInput("%d" % self.number)
43 text_actor.GetTextProperty().ShallowCopy(text_property) 43 text_actor.GetTextProperty().ShallowCopy(text_property)
44 - text_actor.SetPosition(1,1) 44 + text_actor.SetPosition(10, 10)
45 self.text_actor = text_actor 45 self.text_actor = text_actor
46 46
47 - def SetNumber(self, number):  
48 - self.number = number  
49 - self.text_actor.SetInput("%d" % self.number)  
50 -  
51 def SetCursor(self, cursor): 47 def SetCursor(self, cursor):
52 if self.cursor: 48 if self.cursor:
53 self.renderer.RemoveActor(self.cursor.actor) 49 self.renderer.RemoveActor(self.cursor.actor)
54 self.renderer.AddActor(cursor.actor) 50 self.renderer.AddActor(cursor.actor)
55 self.cursor = cursor 51 self.cursor = cursor
56 52
  53 + def SetNumber(self, number):
  54 + self.number = number
  55 + self.text_actor.SetInput("%d" % self.number)
  56 +
57 def SetOrientation(self, orientation): 57 def SetOrientation(self, orientation):
58 self.orientation = orientation 58 self.orientation = orientation
59 colour = const.ORIENTATION_COLOUR[self.orientation] 59 colour = const.ORIENTATION_COLOUR[self.orientation]