Commit dadfc342f2d7861d6c07f2e3666dcf05120a0d0b

Authored by tfmoraes
1 parent 1e7096e6

Circle pencil is rotated based only in the orientation not in original orientation

Showing 1 changed file with 4 additions and 22 deletions   Show diff stats
invesalius/data/cursor_actors.py
... ... @@ -29,9 +29,7 @@ import utils
29 29 class CursorCircle:
30 30 # TODO: Think and try to change this class to an actor
31 31 # CursorCircleActor(vtk.vtkActor)
32   -
33 32 def __init__(self):
34   -
35 33 self.colour = (0.0, 0.0, 1.0)
36 34 self.opacity = 1
37 35 self.radius = 15.0
... ... @@ -51,7 +49,6 @@ class CursorCircle:
51 49 """
52 50 Function to plot the circle
53 51 """
54   -
55 52 r = self.radius
56 53 t = 0
57 54  
... ... @@ -108,7 +105,6 @@ class CursorCircle:
108 105 index = (y*sy)**2 + (x*sx)**2 <= radius**2
109 106 self.points = index
110 107  
111   -
112 108 def SetSize(self, diameter):
113 109 radius = self.radius = diameter/2.0
114 110 #self.disk.SetInnerRadius(radius-1) # filled = self.radius
... ... @@ -116,8 +112,6 @@ class CursorCircle:
116 112 self.__build_actor()
117 113 self.__calculate_area_pixels()
118 114  
119   -
120   -
121 115 def SetColour(self, colour):
122 116 self.colour = colour
123 117 self.actor.GetProperty().SetColor(colour)
... ... @@ -126,21 +120,10 @@ class CursorCircle:
126 120 self.orientation = orientation
127 121 proj = Project()
128 122 orig_orien = proj.original_orientation
129   - if (orig_orien == const.SAGITAL):
130   - if orientation == "CORONAL":
131   - self.actor.RotateY(90)
132   - if orientation == "AXIAL":
133   - self.actor.RotateX(90)
134   - elif(orig_orien == const.CORONAL):
135   - if orientation == "AXIAL":
136   - self.actor.RotateX(270)
137   - if orientation == "SAGITAL":
138   - self.actor.RotateY(90)
139   - else:
140   - if orientation == "CORONAL":
141   - self.actor.RotateX(90)
142   - if orientation == "SAGITAL":
143   - self.actor.RotateY(90)
  123 + if orientation == "CORONAL":
  124 + self.actor.RotateX(90)
  125 + if orientation == "SAGITAL":
  126 + self.actor.RotateY(90)
144 127  
145 128 def SetPosition(self, position):
146 129 self.position = position
... ... @@ -164,7 +147,6 @@ class CursorCircle:
164 147  
165 148  
166 149 class CursorRectangle:
167   -
168 150 def __init__(self):
169 151  
170 152 self.colour = (0.0, 0.0, 1.0)
... ...