diff --git a/invesalius/data/volume.py b/invesalius/data/volume.py index 9da5254..f3a894d 100644 --- a/invesalius/data/volume.py +++ b/invesalius/data/volume.py @@ -612,6 +612,7 @@ class Volume(): volume_mapper.IntermixIntersectingGeometryOn() else: volume_mapper = vtk.vtkGPUVolumeRayCastMapper() + volume_mapper.UseJitteringOn() self.volume_mapper = volume_mapper self.SetTypeRaycasting() @@ -636,14 +637,15 @@ class Volume(): except NameError: pass - # Using these lines to improve the raycasting quality. These values - # seems related to the distance from ray from raycasting. - # TODO: Need to see values that improve the quality and don't decrease - # the performance. 2.0 seems to be a good value to pix_diag - pix_diag = 2.0 - volume_mapper.SetImageSampleDistance(0.25) - volume_mapper.SetSampleDistance(pix_diag / 5.0) - volume_properties.SetScalarOpacityUnitDistance(pix_diag) + if not self.volume_mapper.IsA("vtkGPUVolumeRayCastMapper"): + # Using these lines to improve the raycasting quality. These values + # seems related to the distance from ray from raycasting. + # TODO: Need to see values that improve the quality and don't decrease + # the performance. 2.0 seems to be a good value to pix_diag + pix_diag = 2.0 + volume_mapper.SetImageSampleDistance(0.25) + volume_mapper.SetSampleDistance(pix_diag / 5.0) + volume_properties.SetScalarOpacityUnitDistance(pix_diag) self.volume_properties = volume_properties -- libgit2 0.21.2