Commit 0e082521a3981da4ead73f51662f3656365dfca8
1 parent
47febb45
Exists in
master
and in
68 other branches
ENH: Removed the border in previews in dicom preview panel
Showing
6 changed files
with
15 additions
and
4 deletions
Show diff stats
invesalius/constants.py
@@ -225,7 +225,7 @@ WINDOW_LEVEL = {"Abdomen":(350,50), | @@ -225,7 +225,7 @@ WINDOW_LEVEL = {"Abdomen":(350,50), | ||
225 | "Vasculature - Hard":(240,80), | 225 | "Vasculature - Hard":(240,80), |
226 | "Vasculature - Soft":(650,160)} | 226 | "Vasculature - Soft":(650,160)} |
227 | 227 | ||
228 | -REDUCE_IMAGEDATA_QUALITY = 1 | 228 | +REDUCE_IMAGEDATA_QUALITY = 0 |
229 | 229 | ||
230 | 230 | ||
231 | ICON_DIR = os.path.abspath(os.path.join('..', 'icons')) | 231 | ICON_DIR = os.path.abspath(os.path.join('..', 'icons')) |
@@ -265,6 +265,9 @@ RAYCASTING_TOOLS = ["Cut plane"] | @@ -265,6 +265,9 @@ RAYCASTING_TOOLS = ["Cut plane"] | ||
265 | # If 0 dont't blur, 1 blur | 265 | # If 0 dont't blur, 1 blur |
266 | RAYCASTING_WWWL_BLUR = 0 | 266 | RAYCASTING_WWWL_BLUR = 0 |
267 | 267 | ||
268 | +RAYCASTING_PRESETS_FOLDERS = (RAYCASTING_PRESETS_DIRECTORY, | ||
269 | + USER_RAYCASTING_PRESETS_DIRECTORY) | ||
270 | + | ||
268 | 271 | ||
269 | #### | 272 | #### |
270 | MODE_ZOOM = 0 #"Set Zoom Mode", | 273 | MODE_ZOOM = 0 #"Set Zoom Mode", |
invesalius/data/cursor_actors.py
@@ -230,7 +230,7 @@ class CursorRectangle: | @@ -230,7 +230,7 @@ class CursorRectangle: | ||
230 | self.y_length = 30 | 230 | self.y_length = 30 |
231 | 231 | ||
232 | self.dimension = (self.x_length, self.y_length) | 232 | self.dimension = (self.x_length, self.y_length) |
233 | - #self.position = (0 ,0) | 233 | + self.position = (0 ,0) |
234 | self.orientation = "AXIAL" | 234 | self.orientation = "AXIAL" |
235 | self.spacing = (1, 1, 1) | 235 | self.spacing = (1, 1, 1) |
236 | 236 |
invesalius/data/viewer_slice.py
@@ -621,7 +621,6 @@ class Viewer(wx.Panel): | @@ -621,7 +621,6 @@ class Viewer(wx.Panel): | ||
621 | # FIXME: This is idiot, but is the only way that brush operations are | 621 | # FIXME: This is idiot, but is the only way that brush operations are |
622 | # working when cross is disabled | 622 | # working when cross is disabled |
623 | ps.Publisher().sendMessage('Update slice viewer') | 623 | ps.Publisher().sendMessage('Update slice viewer') |
624 | - ps.Publisher().sendMessage('Update slice viewer') | ||
625 | 624 | ||
626 | def OnBrushMove(self, evt, obj): | 625 | def OnBrushMove(self, evt, obj): |
627 | 626 |
invesalius/gui/default_viewers.py
@@ -278,6 +278,7 @@ class VolumeInteraction(wx.Panel): | @@ -278,6 +278,7 @@ class VolumeInteraction(wx.Panel): | ||
278 | 278 | ||
279 | def OnSetRaycastPreset(self, evt_pubsub): | 279 | def OnSetRaycastPreset(self, evt_pubsub): |
280 | preset = project.Project().raycasting_preset | 280 | preset = project.Project().raycasting_preset |
281 | + print "Preset >>>", preset | ||
281 | p = self.aui_manager.GetPane(self.clut_raycasting) | 282 | p = self.aui_manager.GetPane(self.clut_raycasting) |
282 | self.clut_raycasting.SetRaycastPreset(preset) | 283 | self.clut_raycasting.SetRaycastPreset(preset) |
283 | if self.clut_raycasting.to_draw_points and \ | 284 | if self.clut_raycasting.to_draw_points and \ |
@@ -471,6 +472,13 @@ class VolumeToolPanel(wx.Panel): | @@ -471,6 +472,13 @@ class VolumeToolPanel(wx.Panel): | ||
471 | 472 | ||
472 | self.Fit() | 473 | self.Fit() |
473 | self.Update() | 474 | self.Update() |
475 | + | ||
476 | + def BuildRaycastingMenu(self): | ||
477 | + presets = [] | ||
478 | + for folder in const.RAYCASTING_PRESETS_FOLDERS: | ||
479 | + presets += [filename.split(".")[0] for filename in | ||
480 | + os.listdir(folder) if | ||
481 | + os.path.isfile(os.path.join(folder,filename))] | ||
474 | 482 | ||
475 | def OnMenuPlaneSlice(self, evt): | 483 | def OnMenuPlaneSlice(self, evt): |
476 | 484 |
invesalius/gui/dicom_preview_panel.py
@@ -85,7 +85,7 @@ class Preview(wx.Panel): | @@ -85,7 +85,7 @@ class Preview(wx.Panel): | ||
85 | The little previews. | 85 | The little previews. |
86 | """ | 86 | """ |
87 | def __init__(self, parent): | 87 | def __init__(self, parent): |
88 | - super(Preview, self).__init__(parent, style=wx.SUNKEN_BORDER) | 88 | + super(Preview, self).__init__(parent) |
89 | # Will it be white? | 89 | # Will it be white? |
90 | self.select_on = False | 90 | self.select_on = False |
91 | self._init_ui() | 91 | self._init_ui() |
invesalius/gui/widgets/clut_raycasting.py
@@ -626,6 +626,7 @@ class CLUTRaycastingWidget(wx.Panel): | @@ -626,6 +626,7 @@ class CLUTRaycastingWidget(wx.Panel): | ||
626 | self._draw_curves(ctx) | 626 | self._draw_curves(ctx) |
627 | self._draw_points(ctx) | 627 | self._draw_points(ctx) |
628 | self._draw_selection_curve(ctx, height) | 628 | self._draw_selection_curve(ctx, height) |
629 | + self._draw_tool_bar(ctx, height) | ||
629 | if sys.platform != "darwin": | 630 | if sys.platform != "darwin": |
630 | self._draw_tool_bar(ctx, height) | 631 | self._draw_tool_bar(ctx, height) |
631 | if self.point_dragged: | 632 | if self.point_dragged: |