Commit dd3709f64348d3080ea17d81c320ff232bbc8f43
1 parent
b0904169
Exists in
master
and in
68 other branches
FIX: Brush square in coronal and sagittal
Showing
2 changed files
with
7 additions
and
4 deletions
Show diff stats
invesalius/control.py
... | ... | @@ -7,7 +7,7 @@ import data.imagedata_utils as utils |
7 | 7 | import data.surface as surface |
8 | 8 | import data.volume as volume |
9 | 9 | import reader.dicom_reader as dicom |
10 | -#import reader.analyze_reader as analyze | |
10 | +import reader.analyze_reader as analyze | |
11 | 11 | |
12 | 12 | DEFAULT_THRESH_MODE = 0 |
13 | 13 | ... | ... |
invesalius/data/viewer_slice.py
... | ... | @@ -46,7 +46,9 @@ class Viewer(wx.Panel): |
46 | 46 | self.slice_number = 0 |
47 | 47 | |
48 | 48 | self._brush_cursor_op = 'Draw' |
49 | - self.brush_cursor_size = 30 | |
49 | + self._brush_cursor_size = 30 | |
50 | + self._brush_cursor_colour = [0,0,1] | |
51 | + self._brush_cursor_type = 'circle' | |
50 | 52 | self.cursor = None |
51 | 53 | # VTK pipeline and actors |
52 | 54 | self.__config_interactor() |
... | ... | @@ -123,7 +125,7 @@ class Viewer(wx.Panel): |
123 | 125 | |
124 | 126 | def ChangeBrushSize(self, pubsub_evt): |
125 | 127 | size = pubsub_evt.data |
126 | - self.brush_cursor_size = size | |
128 | + self._brush_cursor_size = size | |
127 | 129 | self.cursor.SetSize(size) |
128 | 130 | self.ren.Render() |
129 | 131 | self.interactor.Render() |
... | ... | @@ -139,6 +141,7 @@ class Viewer(wx.Panel): |
139 | 141 | |
140 | 142 | def ChangeBrushActor(self, pubsub_evt): |
141 | 143 | brush_type = pubsub_evt.data |
144 | + self._brush_cursor_type = brush_type | |
142 | 145 | self.ren.RemoveActor(self.cursor.actor) |
143 | 146 | |
144 | 147 | if brush_type == 'square': |
... | ... | @@ -154,7 +157,7 @@ class Viewer(wx.Panel): |
154 | 157 | cursor.SetPosition(coordinates[self.orientation]) |
155 | 158 | cursor.SetSpacing(self.imagedata.GetSpacing()) |
156 | 159 | cursor.SetColour(self._brush_cursor_colour) |
157 | - cursor.SetSize(self.brush_cursor_size) | |
160 | + cursor.SetSize(self._brush_cursor_size) | |
158 | 161 | self.ren.AddActor(cursor.actor) |
159 | 162 | self.ren.Render() |
160 | 163 | self.interactor.Render() | ... | ... |