From 0e082521a3981da4ead73f51662f3656365dfca8 Mon Sep 17 00:00:00 2001 From: tfmoraes Date: Fri, 8 Jan 2010 11:41:46 +0000 Subject: [PATCH] ENH: Removed the border in previews in dicom preview panel --- invesalius/constants.py | 5 ++++- invesalius/data/cursor_actors.py | 2 +- invesalius/data/viewer_slice.py | 1 - invesalius/gui/default_viewers.py | 8 ++++++++ invesalius/gui/dicom_preview_panel.py | 2 +- invesalius/gui/widgets/clut_raycasting.py | 1 + 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/invesalius/constants.py b/invesalius/constants.py index ca77a7b..db4090a 100644 --- a/invesalius/constants.py +++ b/invesalius/constants.py @@ -225,7 +225,7 @@ WINDOW_LEVEL = {"Abdomen":(350,50), "Vasculature - Hard":(240,80), "Vasculature - Soft":(650,160)} -REDUCE_IMAGEDATA_QUALITY = 1 +REDUCE_IMAGEDATA_QUALITY = 0 ICON_DIR = os.path.abspath(os.path.join('..', 'icons')) @@ -265,6 +265,9 @@ RAYCASTING_TOOLS = ["Cut plane"] # If 0 dont't blur, 1 blur RAYCASTING_WWWL_BLUR = 0 +RAYCASTING_PRESETS_FOLDERS = (RAYCASTING_PRESETS_DIRECTORY, + USER_RAYCASTING_PRESETS_DIRECTORY) + #### MODE_ZOOM = 0 #"Set Zoom Mode", diff --git a/invesalius/data/cursor_actors.py b/invesalius/data/cursor_actors.py index a99495c..189f1f2 100644 --- a/invesalius/data/cursor_actors.py +++ b/invesalius/data/cursor_actors.py @@ -230,7 +230,7 @@ class CursorRectangle: self.y_length = 30 self.dimension = (self.x_length, self.y_length) - #self.position = (0 ,0) + self.position = (0 ,0) self.orientation = "AXIAL" self.spacing = (1, 1, 1) diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index 676f781..a2bc086 100755 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -621,7 +621,6 @@ class Viewer(wx.Panel): # FIXME: This is idiot, but is the only way that brush operations are # working when cross is disabled ps.Publisher().sendMessage('Update slice viewer') - ps.Publisher().sendMessage('Update slice viewer') def OnBrushMove(self, evt, obj): diff --git a/invesalius/gui/default_viewers.py b/invesalius/gui/default_viewers.py index 2a68166..1e0edcd 100755 --- a/invesalius/gui/default_viewers.py +++ b/invesalius/gui/default_viewers.py @@ -278,6 +278,7 @@ class VolumeInteraction(wx.Panel): def OnSetRaycastPreset(self, evt_pubsub): preset = project.Project().raycasting_preset + print "Preset >>>", preset p = self.aui_manager.GetPane(self.clut_raycasting) self.clut_raycasting.SetRaycastPreset(preset) if self.clut_raycasting.to_draw_points and \ @@ -471,6 +472,13 @@ class VolumeToolPanel(wx.Panel): self.Fit() self.Update() + + def BuildRaycastingMenu(self): + presets = [] + for folder in const.RAYCASTING_PRESETS_FOLDERS: + presets += [filename.split(".")[0] for filename in + os.listdir(folder) if + os.path.isfile(os.path.join(folder,filename))] def OnMenuPlaneSlice(self, evt): diff --git a/invesalius/gui/dicom_preview_panel.py b/invesalius/gui/dicom_preview_panel.py index 5658714..617e710 100755 --- a/invesalius/gui/dicom_preview_panel.py +++ b/invesalius/gui/dicom_preview_panel.py @@ -85,7 +85,7 @@ class Preview(wx.Panel): The little previews. """ def __init__(self, parent): - super(Preview, self).__init__(parent, style=wx.SUNKEN_BORDER) + super(Preview, self).__init__(parent) # Will it be white? self.select_on = False self._init_ui() diff --git a/invesalius/gui/widgets/clut_raycasting.py b/invesalius/gui/widgets/clut_raycasting.py index 0433f64..a45f251 100644 --- a/invesalius/gui/widgets/clut_raycasting.py +++ b/invesalius/gui/widgets/clut_raycasting.py @@ -626,6 +626,7 @@ class CLUTRaycastingWidget(wx.Panel): self._draw_curves(ctx) self._draw_points(ctx) self._draw_selection_curve(ctx, height) + self._draw_tool_bar(ctx, height) if sys.platform != "darwin": self._draw_tool_bar(ctx, height) if self.point_dragged: -- libgit2 0.21.2