Commit a13ab1bd1335a1824bdfccd2c9c7bde116227138
1 parent
82530df3
Exists in
master
and in
68 other branches
ADD: A option to blur the volume when in setting ww & wl
Showing
2 changed files
with
8 additions
and
6 deletions
Show diff stats
invesalius/constants.py
... | ... | @@ -165,7 +165,7 @@ REDUCE_IMAGEDATA_QUALITY = 1 |
165 | 165 | |
166 | 166 | |
167 | 167 | # if 1, use vtkVolumeRaycastMapper, if 0, use vtkFixedPointVolumeRayCastMapper |
168 | -TYPE_RAYCASTING_MAPPER = 1 | |
168 | +TYPE_RAYCASTING_MAPPER = 0 | |
169 | 169 | |
170 | 170 | folder=RAYCASTING_PRESETS_DIRECTORY= os.path.join("..", "presets", "raycasting") |
171 | 171 | |
... | ... | @@ -182,6 +182,8 @@ RAYCASTING_TYPES.sort() |
182 | 182 | RAYCASTING_OFF_LABEL = ' Off' |
183 | 183 | RAYCASTING_TOOLS = ["Cut plane"] |
184 | 184 | |
185 | +# If 0 dont't blur, 1 blur | |
186 | +RAYCASTING_WWWL_BLUR = 0 | |
185 | 187 | |
186 | 188 | |
187 | 189 | #### | ... | ... |
invesalius/data/viewer_volume.py
... | ... | @@ -179,13 +179,16 @@ class Viewer(wx.Panel): |
179 | 179 | self.interactor.Render() |
180 | 180 | |
181 | 181 | def OnWindowLevelClick(self, obj, evt): |
182 | + if const.RAYCASTING_WWWL_BLUR: | |
183 | + self.style.StartZoom() | |
182 | 184 | self.onclick = True |
183 | 185 | mouse_x, mouse_y = self.interactor.GetEventPosition() |
184 | 186 | self.last_x, self.last_y = mouse_x, mouse_y |
185 | 187 | |
186 | 188 | def OnWindowLevelRelease(self, obj, evt): |
187 | 189 | self.onclick = False |
188 | - | |
190 | + if const.RAYCASTING_WWWL_BLUR: | |
191 | + self.style.EndZoom() | |
189 | 192 | |
190 | 193 | def ShowOrientationCube(self): |
191 | 194 | print "ORIENTATION CUBE!" |
... | ... | @@ -418,11 +421,7 @@ class Viewer(wx.Panel): |
418 | 421 | def AppendActor(self, evt_pubsub=None): |
419 | 422 | self.ren.AddActor(evt_pubsub.data) |
420 | 423 | |
421 | - | |
422 | - | |
423 | - | |
424 | 424 | class SlicePlane: |
425 | - | |
426 | 425 | def __init__(self): |
427 | 426 | project = prj.Project() |
428 | 427 | self.original_orientation = project.original_orientation |
... | ... | @@ -670,3 +669,4 @@ class SlicePlane: |
670 | 669 | else: |
671 | 670 | self.plane_z.SetPlaneOrientationToZAxes() |
672 | 671 | self.plane_z.SetSliceIndex(number) |
672 | + | ... | ... |