Commit faa6c3259f76635289c45ea0b59207dbce972448
1 parent
a1e6c2e2
Exists in
master
and in
67 other branches
FIX: Start to return function and Window Level.
Showing
2 changed files
with
10 additions
and
8 deletions
Show diff stats
invesalius/data/slice_.py
| ... | ... | @@ -586,8 +586,12 @@ class Slice(object): |
| 586 | 586 | return img_colours_bg.GetOutput() |
| 587 | 587 | |
| 588 | 588 | def UpdateWindowLevelBackground(self, pubsub_evt): |
| 589 | - pass | |
| 590 | - #window, level = pubsub_evt.data | |
| 589 | + | |
| 590 | + window, level = pubsub_evt.data | |
| 591 | + self.window_width = window | |
| 592 | + self.window_level = level | |
| 593 | + ps.Publisher().sendMessage('Reload actual slice') | |
| 594 | + ps.Publisher().sendMessage('Update slice viewer') | |
| 591 | 595 | #window_level = self.window_level |
| 592 | 596 | |
| 593 | 597 | #if not((window == window_level.GetWindow()) and\ | ... | ... |
invesalius/data/viewer_slice.py
| ... | ... | @@ -358,7 +358,7 @@ class Viewer(wx.Panel): |
| 358 | 358 | window, level = pubsub_evt.data |
| 359 | 359 | self.acum_achange_window, self.acum_achange_level = (window, level) |
| 360 | 360 | self.SetWLText(window, level) |
| 361 | - | |
| 361 | + | |
| 362 | 362 | |
| 363 | 363 | def OnChangeSliceMove(self, evt, obj): |
| 364 | 364 | if (self.left_pressed): |
| ... | ... | @@ -443,9 +443,7 @@ class Viewer(wx.Panel): |
| 443 | 443 | # Window & Level text |
| 444 | 444 | self.wl_text = vtku.Text() |
| 445 | 445 | self.SetWLText(proj.level, proj.window) |
| 446 | - | |
| 447 | - | |
| 448 | - # Orientation text | |
| 446 | + # Orientation texea | |
| 449 | 447 | if self.orientation == 'AXIAL': |
| 450 | 448 | values = [_('R'), _('L'), _('A'), _('P')] |
| 451 | 449 | elif self.orientation == 'SAGITAL': |
| ... | ... | @@ -1094,9 +1092,9 @@ class Viewer(wx.Panel): |
| 1094 | 1092 | #actor_bound = actor.GetBounds() |
| 1095 | 1093 | self.interactor.Render() |
| 1096 | 1094 | |
| 1097 | - #self.EnableText() | |
| 1095 | + self.EnableText() | |
| 1098 | 1096 | ## Insert cursor |
| 1099 | - #self.SetInteractorStyle(const.STATE_DEFAULT) | |
| 1097 | + self.SetInteractorStyle(const.STATE_DEFAULT) | |
| 1100 | 1098 | |
| 1101 | 1099 | #self.__build_cross_lines() |
| 1102 | 1100 | ... | ... |