Commit f2fa09e63d2cbf60eb93485313203a5839a7a4bb
1 parent
dca44b9b
Exists in
master
and in
23 other branches
Cut plane was not working with VTK6
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
invesalius/data/volume.py
@@ -648,7 +648,7 @@ class Volume(): | @@ -648,7 +648,7 @@ class Volume(): | ||
648 | self.plane_on = False | 648 | self.plane_on = False |
649 | self.plane.Disable() | 649 | self.plane.Disable() |
650 | else: | 650 | else: |
651 | - self.final_imagedata.Update() | 651 | + # self.final_imagedata.Update() |
652 | self.plane_on = True | 652 | self.plane_on = True |
653 | self.plane = CutPlane(self.final_imagedata, | 653 | self.plane = CutPlane(self.final_imagedata, |
654 | self.volume_mapper) | 654 | self.volume_mapper) |
@@ -692,7 +692,7 @@ class CutPlane: | @@ -692,7 +692,7 @@ class CutPlane: | ||
692 | 692 | ||
693 | def Create(self): | 693 | def Create(self): |
694 | self.plane_widget = plane_widget = vtk.vtkImagePlaneWidget() | 694 | self.plane_widget = plane_widget = vtk.vtkImagePlaneWidget() |
695 | - plane_widget.SetInput(self.img) | 695 | + plane_widget.SetInputData(self.img) |
696 | plane_widget.SetPlaneOrientationToXAxes() | 696 | plane_widget.SetPlaneOrientationToXAxes() |
697 | #plane_widget.SetResliceInterpolateToLinear() | 697 | #plane_widget.SetResliceInterpolateToLinear() |
698 | plane_widget.TextureVisibilityOff() | 698 | plane_widget.TextureVisibilityOff() |
@@ -710,7 +710,7 @@ class CutPlane: | @@ -710,7 +710,7 @@ class CutPlane: | ||
710 | plane_source.SetPoint2(plane_widget.GetPoint2()) | 710 | plane_source.SetPoint2(plane_widget.GetPoint2()) |
711 | plane_source.SetNormal(plane_widget.GetNormal()) | 711 | plane_source.SetNormal(plane_widget.GetNormal()) |
712 | plane_mapper = self.plane_mapper = vtk.vtkPolyDataMapper() | 712 | plane_mapper = self.plane_mapper = vtk.vtkPolyDataMapper() |
713 | - plane_mapper.SetInput(plane_source.GetOutput()) | 713 | + plane_mapper.SetInputData(plane_source.GetOutput()) |
714 | self.plane_actor = plane_actor = vtk.vtkActor() | 714 | self.plane_actor = plane_actor = vtk.vtkActor() |
715 | plane_actor.SetMapper(plane_mapper) | 715 | plane_actor.SetMapper(plane_mapper) |
716 | plane_actor.GetProperty().BackfaceCullingOn() | 716 | plane_actor.GetProperty().BackfaceCullingOn() |