Commit 8f6722c0ec701c0388681c4d85c9eb9c0b037b63

Authored by tfmoraes
1 parent f464a514

ENH: Changed the vtkVolumeRaycastMapper to vtkFixedPointVolumeRaycast

Showing 1 changed file with 6 additions and 4 deletions   Show diff stats
invesalius/data/volume.py
... ... @@ -348,12 +348,15 @@ class Volume():
348 348 gradientEstimator = vtk.vtkFiniteDifferenceGradientEstimator()
349 349 gradientEstimator.SetGradientMagnitudeScale(1)
350 350  
351   - volume_mapper = vtk.vtkVolumeRayCastMapper()
  351 + # Changed the vtkVolumeRayCast to vtkFixedPointVolumeRayCastMapper
  352 + # because it's faster and the image is better
  353 + # TODO: To test if it's true.
  354 + volume_mapper = vtk.vtkFixedPointVolumeRayCastMapper()
352 355 #volume_mapper.AutoAdjustSampleDistancesOff()
353 356 volume_mapper.SetInput(image2.GetOutput())
354   - volume_mapper.SetVolumeRayCastFunction(composite_function)
  357 + #volume_mapper.SetVolumeRayCastFunction(composite_function)
355 358 #volume_mapper.SetGradientEstimator(gradientEstimator)
356   - volume_mapper.IntermixIntersectingGeometryOn()
  359 + #volume_mapper.IntermixIntersectingGeometryOn()
357 360  
358 361 #Cut Plane
359 362 CutPlane(image2.GetOutput(), volume_mapper)
... ... @@ -393,7 +396,6 @@ class Volume():
393 396  
394 397 colour = self.CreateBackgroundColor()
395 398 ps.Publisher().sendMessage('Load volume into viewer', (volume, colour))
396   -
397 399  
398 400 def TranslateScale(self, scale, value):
399 401 #if value < 0:
... ...