Commit 8ff12506c69ffb0a28a34e1ce678ae458e613558
1 parent
d641a715
Exists in
master
and in
68 other branches
ADD: When a preset is setted it sends a pubsub message
FIX: Changed back the raycast mapper
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
invesalius/data/volume.py
... | ... | @@ -90,6 +90,8 @@ class Volume(): |
90 | 90 | self.LoadConfig(pubsub_evt.data) |
91 | 91 | self.Create16bColorTable(self.scale) |
92 | 92 | self.CreateOpacityTable(self.scale) |
93 | + colour = self.CreateBackgroundColor() | |
94 | + ps.Publisher.sendMessage('Set colour interactor', colour) | |
93 | 95 | |
94 | 96 | def SetWWWL(self, pubsub_evt): |
95 | 97 | ww, wl, n = pubsub_evt.data |
... | ... | @@ -115,6 +117,7 @@ class Volume(): |
115 | 117 | else: |
116 | 118 | i['x'] += shiftWW * factor |
117 | 119 | |
120 | + self.Create16bColorTable(self.scale) | |
118 | 121 | self.CreateOpacityTable(self.scale) |
119 | 122 | print curve |
120 | 123 | ps.Publisher().sendMessage('Render volume viewer', None) |
... | ... | @@ -297,11 +300,11 @@ class Volume(): |
297 | 300 | gradientEstimator = vtk.vtkFiniteDifferenceGradientEstimator() |
298 | 301 | gradientEstimator.SetGradientMagnitudeScale(1) |
299 | 302 | |
300 | - volume_mapper = vtk.vtkFixedPointVolumeRayCastMapper() | |
303 | + volume_mapper = vtk.vtkVolumeRayCastMapper() | |
301 | 304 | #volume_mapper.AutoAdjustSampleDistancesOff() |
302 | 305 | volume_mapper.SetInput(image2.GetOutput()) |
303 | - #volume_mapper.SetVolumeRayCastFunction(composite_function) | |
304 | - #volume_mapper.SetGradientEstimator(gradientEstimator) | |
306 | + volume_mapper.SetVolumeRayCastFunction(composite_function) | |
307 | + volume_mapper.SetGradientEstimator(gradientEstimator) | |
305 | 308 | volume_mapper.IntermixIntersectingGeometryOn() |
306 | 309 | |
307 | 310 | #Cut Plane | ... | ... |