From faa6c3259f76635289c45ea0b59207dbce972448 Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Fri, 10 Dec 2010 11:41:26 +0000 Subject: [PATCH] FIX: Start to return function and Window Level. --- invesalius/data/slice_.py | 8 ++++++-- invesalius/data/viewer_slice.py | 10 ++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py index 08c0e25..be6809f 100644 --- a/invesalius/data/slice_.py +++ b/invesalius/data/slice_.py @@ -586,8 +586,12 @@ class Slice(object): return img_colours_bg.GetOutput() def UpdateWindowLevelBackground(self, pubsub_evt): - pass - #window, level = pubsub_evt.data + + window, level = pubsub_evt.data + self.window_width = window + self.window_level = level + ps.Publisher().sendMessage('Reload actual slice') + ps.Publisher().sendMessage('Update slice viewer') #window_level = self.window_level #if not((window == window_level.GetWindow()) and\ diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index 9038ae5..2d50894 100755 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -358,7 +358,7 @@ class Viewer(wx.Panel): window, level = pubsub_evt.data self.acum_achange_window, self.acum_achange_level = (window, level) self.SetWLText(window, level) - + def OnChangeSliceMove(self, evt, obj): if (self.left_pressed): @@ -443,9 +443,7 @@ class Viewer(wx.Panel): # Window & Level text self.wl_text = vtku.Text() self.SetWLText(proj.level, proj.window) - - - # Orientation text + # Orientation texea if self.orientation == 'AXIAL': values = [_('R'), _('L'), _('A'), _('P')] elif self.orientation == 'SAGITAL': @@ -1094,9 +1092,9 @@ class Viewer(wx.Panel): #actor_bound = actor.GetBounds() self.interactor.Render() - #self.EnableText() + self.EnableText() ## Insert cursor - #self.SetInteractorStyle(const.STATE_DEFAULT) + self.SetInteractorStyle(const.STATE_DEFAULT) #self.__build_cross_lines() -- libgit2 0.21.2