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,6 +90,8 @@ class Volume(): | ||
90 | self.LoadConfig(pubsub_evt.data) | 90 | self.LoadConfig(pubsub_evt.data) |
91 | self.Create16bColorTable(self.scale) | 91 | self.Create16bColorTable(self.scale) |
92 | self.CreateOpacityTable(self.scale) | 92 | self.CreateOpacityTable(self.scale) |
93 | + colour = self.CreateBackgroundColor() | ||
94 | + ps.Publisher.sendMessage('Set colour interactor', colour) | ||
93 | 95 | ||
94 | def SetWWWL(self, pubsub_evt): | 96 | def SetWWWL(self, pubsub_evt): |
95 | ww, wl, n = pubsub_evt.data | 97 | ww, wl, n = pubsub_evt.data |
@@ -115,6 +117,7 @@ class Volume(): | @@ -115,6 +117,7 @@ class Volume(): | ||
115 | else: | 117 | else: |
116 | i['x'] += shiftWW * factor | 118 | i['x'] += shiftWW * factor |
117 | 119 | ||
120 | + self.Create16bColorTable(self.scale) | ||
118 | self.CreateOpacityTable(self.scale) | 121 | self.CreateOpacityTable(self.scale) |
119 | print curve | 122 | print curve |
120 | ps.Publisher().sendMessage('Render volume viewer', None) | 123 | ps.Publisher().sendMessage('Render volume viewer', None) |
@@ -297,11 +300,11 @@ class Volume(): | @@ -297,11 +300,11 @@ class Volume(): | ||
297 | gradientEstimator = vtk.vtkFiniteDifferenceGradientEstimator() | 300 | gradientEstimator = vtk.vtkFiniteDifferenceGradientEstimator() |
298 | gradientEstimator.SetGradientMagnitudeScale(1) | 301 | gradientEstimator.SetGradientMagnitudeScale(1) |
299 | 302 | ||
300 | - volume_mapper = vtk.vtkFixedPointVolumeRayCastMapper() | 303 | + volume_mapper = vtk.vtkVolumeRayCastMapper() |
301 | #volume_mapper.AutoAdjustSampleDistancesOff() | 304 | #volume_mapper.AutoAdjustSampleDistancesOff() |
302 | volume_mapper.SetInput(image2.GetOutput()) | 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 | volume_mapper.IntermixIntersectingGeometryOn() | 308 | volume_mapper.IntermixIntersectingGeometryOn() |
306 | 309 | ||
307 | #Cut Plane | 310 | #Cut Plane |