From a13ab1bd1335a1824bdfccd2c9c7bde116227138 Mon Sep 17 00:00:00 2001 From: tfmoraes Date: Fri, 2 Oct 2009 11:50:48 +0000 Subject: [PATCH] ADD: A option to blur the volume when in setting ww & wl --- invesalius/constants.py | 4 +++- invesalius/data/viewer_volume.py | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/invesalius/constants.py b/invesalius/constants.py index 78ceb8e..0559f75 100644 --- a/invesalius/constants.py +++ b/invesalius/constants.py @@ -165,7 +165,7 @@ REDUCE_IMAGEDATA_QUALITY = 1 # if 1, use vtkVolumeRaycastMapper, if 0, use vtkFixedPointVolumeRayCastMapper -TYPE_RAYCASTING_MAPPER = 1 +TYPE_RAYCASTING_MAPPER = 0 folder=RAYCASTING_PRESETS_DIRECTORY= os.path.join("..", "presets", "raycasting") @@ -182,6 +182,8 @@ RAYCASTING_TYPES.sort() RAYCASTING_OFF_LABEL = ' Off' RAYCASTING_TOOLS = ["Cut plane"] +# If 0 dont't blur, 1 blur +RAYCASTING_WWWL_BLUR = 0 #### diff --git a/invesalius/data/viewer_volume.py b/invesalius/data/viewer_volume.py index 7bae9d6..80357fd 100755 --- a/invesalius/data/viewer_volume.py +++ b/invesalius/data/viewer_volume.py @@ -179,13 +179,16 @@ class Viewer(wx.Panel): self.interactor.Render() def OnWindowLevelClick(self, obj, evt): + if const.RAYCASTING_WWWL_BLUR: + self.style.StartZoom() self.onclick = True mouse_x, mouse_y = self.interactor.GetEventPosition() self.last_x, self.last_y = mouse_x, mouse_y def OnWindowLevelRelease(self, obj, evt): self.onclick = False - + if const.RAYCASTING_WWWL_BLUR: + self.style.EndZoom() def ShowOrientationCube(self): print "ORIENTATION CUBE!" @@ -418,11 +421,7 @@ class Viewer(wx.Panel): def AppendActor(self, evt_pubsub=None): self.ren.AddActor(evt_pubsub.data) - - - class SlicePlane: - def __init__(self): project = prj.Project() self.original_orientation = project.original_orientation @@ -670,3 +669,4 @@ class SlicePlane: else: self.plane_z.SetPlaneOrientationToZAxes() self.plane_z.SetSliceIndex(number) + -- libgit2 0.21.2