From d8293fcf9ddf99aa14764542f70a846de33cb9f0 Mon Sep 17 00:00:00 2001 From: tfmoraes Date: Mon, 17 Aug 2009 17:30:20 +0000 Subject: [PATCH] FIX: Window width & level working in 8 bit raycasting preset --- invesalius/data/volume.py | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/invesalius/data/volume.py b/invesalius/data/volume.py index bbda6fe..ea763cf 100755 --- a/invesalius/data/volume.py +++ b/invesalius/data/volume.py @@ -152,6 +152,7 @@ class Volume(): def OnSetRelativeWindowLevel(self, pubsub_evt): diff_ww, diff_wl = pubsub_evt.data + print diff_ww ww = self.ww + diff_ww wl = self.wl + diff_wl ps.Publisher().sendMessage('Set volume window and level text', @@ -294,6 +295,9 @@ class Volume(): l1 = wl - ww/2.0 l2 = wl + ww/2.0 + self.ww = ww + self.wl = wl + opacity_transfer_func.RemoveAllPoints() opacity_transfer_func.AddSegment(0, 0, 2**16-1, 0) @@ -349,7 +353,9 @@ class Volume(): self.volume_properties.SetSpecularPower(shading['specularPower']) def ApplyConvolution(self, imagedata): + number_filters = len(self.config['convolutionFilters']) for filter in self.config['convolutionFilters']: + print "convolving", filter convolve = vtk.vtkImageConvolve() convolve.SetInput(imagedata) convolve.SetKernel5x5([i/60.0 for i in Kernels[filter]]) -- libgit2 0.21.2