Commit b911f5a14baabf16b806ae4242eee1bcb595fc0e
1 parent
c3bcac3d
Exists in
master
and in
67 other branches
Added init of GPU support
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
invesalius/data/volume.py
@@ -432,7 +432,7 @@ class Volume(): | @@ -432,7 +432,7 @@ class Volume(): | ||
432 | raycasting_function = vtk.vtkVolumeRayCastCompositeFunction() | 432 | raycasting_function = vtk.vtkVolumeRayCastCompositeFunction() |
433 | raycasting_function.SetCompositeMethodToInterpolateFirst() | 433 | raycasting_function.SetCompositeMethodToInterpolateFirst() |
434 | 434 | ||
435 | - if ses.Session().rendering == 0: | 435 | + if ses.Session().rendering == '0': |
436 | self.volume_mapper.SetVolumeRayCastFunction(raycasting_function) | 436 | self.volume_mapper.SetVolumeRayCastFunction(raycasting_function) |
437 | 437 | ||
438 | def ApplyConvolution(self, imagedata, update_progress = None): | 438 | def ApplyConvolution(self, imagedata, update_progress = None): |
@@ -516,13 +516,11 @@ class Volume(): | @@ -516,13 +516,11 @@ class Volume(): | ||
516 | volume_mapper.IntermixIntersectingGeometryOn() | 516 | volume_mapper.IntermixIntersectingGeometryOn() |
517 | self.volume_mapper = volume_mapper | 517 | self.volume_mapper = volume_mapper |
518 | else: | 518 | else: |
519 | - | ||
520 | - if ses.Session().rendering == 0: | 519 | + if ses.Session().rendering == '0': |
521 | volume_mapper = vtk.vtkFixedPointVolumeRayCastMapper() | 520 | volume_mapper = vtk.vtkFixedPointVolumeRayCastMapper() |
522 | #volume_mapper.AutoAdjustSampleDistancesOff() | 521 | #volume_mapper.AutoAdjustSampleDistancesOff() |
523 | self.volume_mapper = volume_mapper | 522 | self.volume_mapper = volume_mapper |
524 | volume_mapper.IntermixIntersectingGeometryOn() | 523 | volume_mapper.IntermixIntersectingGeometryOn() |
525 | - | ||
526 | else: | 524 | else: |
527 | volume_mapper = vtk.vtkGPUVolumeRayCastMapper() | 525 | volume_mapper = vtk.vtkGPUVolumeRayCastMapper() |
528 | self.volume_mapper = volume_mapper | 526 | self.volume_mapper = volume_mapper |