diff --git a/invesalius/constants.py b/invesalius/constants.py index be69fa0..9f6d41b 100644 --- a/invesalius/constants.py +++ b/invesalius/constants.py @@ -92,5 +92,7 @@ WINDOW_LEVEL = {"Abdomen":(350,50), "Vasculature - Hard":(240,80), "Vasculature - Soft":(650,160)} -REDUCE_IMAGEDATA_QUALITY = 1 +REDUCE_IMAGEDATA_QUALITY = 0 +# if 1, use vtkVolumeRaycastMapper, if 0, use vtkFixedPointVolumeRayCastMapper +TYPE_RAYCASTING_MAPPER = 0 diff --git a/invesalius/data/volume.py b/invesalius/data/volume.py index c279b48..97dcde6 100755 --- a/invesalius/data/volume.py +++ b/invesalius/data/volume.py @@ -23,6 +23,7 @@ import vtk import wx import wx.lib.pubsub as ps +import constants from project import Project Kernels = { @@ -351,12 +352,18 @@ class Volume(): # Changed the vtkVolumeRayCast to vtkFixedPointVolumeRayCastMapper # because it's faster and the image is better # TODO: To test if it's true. - volume_mapper = vtk.vtkFixedPointVolumeRayCastMapper() - #volume_mapper.AutoAdjustSampleDistancesOff() - volume_mapper.SetInput(image2.GetOutput()) - #volume_mapper.SetVolumeRayCastFunction(composite_function) - #volume_mapper.SetGradientEstimator(gradientEstimator) - #volume_mapper.IntermixIntersectingGeometryOn() + if constants.TYPE_RAYCASTING_MAPPER: + volume_mapper = vtk.vtkVolumeRayCastMapper() + #volume_mapper.AutoAdjustSampleDistancesOff() + volume_mapper.SetInput(image2.GetOutput()) + volume_mapper.SetVolumeRayCastFunction(composite_function) + #volume_mapper.SetGradientEstimator(gradientEstimator) + volume_mapper.IntermixIntersectingGeometryOn() + else: + volume_mapper = vtk.vtkFixedPointVolumeRayCastMapper() + #volume_mapper.AutoAdjustSampleDistancesOff() + volume_mapper.SetInput(image2.GetOutput()) + volume_mapper.IntermixIntersectingGeometryOn() #Cut Plane CutPlane(image2.GetOutput(), volume_mapper) -- libgit2 0.21.2