From 88338b9b432108df37da9d7f7be6c719791b743c Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Fri, 5 Dec 2014 15:02:48 -0500 Subject: [PATCH] BUG: fix issues related to VTK6 changes see #4 --- Py/SlicerLongitudinalPETCTModuleSegmentationHelper.py | 7 +++++-- Py/qSlicerLongitudinalPETCTModuleWidget.py | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Py/SlicerLongitudinalPETCTModuleSegmentationHelper.py b/Py/SlicerLongitudinalPETCTModuleSegmentationHelper.py index c70720c..8a74cdb 100644 --- a/Py/SlicerLongitudinalPETCTModuleSegmentationHelper.py +++ b/Py/SlicerLongitudinalPETCTModuleSegmentationHelper.py @@ -115,7 +115,10 @@ def removeSegmentationFromVolume(lblVolume, colorID): if imgData: change = slicer.vtkImageLabelChange() - change.SetInput(imgData) + if vtk.VTK_MAJOR_VERSION <= 5: + change.SetInput(imgData) + else: + change.SetInputData(imgData) change.SetInputLabel(colorID) change.SetOutputLabel(0) @@ -128,4 +131,4 @@ def removeSegmentationFromVolume(lblVolume, colorID): output.Modified() lblVolume.Modified() - \ No newline at end of file + diff --git a/Py/qSlicerLongitudinalPETCTModuleWidget.py b/Py/qSlicerLongitudinalPETCTModuleWidget.py index e922b2d..191a3e3 100644 --- a/Py/qSlicerLongitudinalPETCTModuleWidget.py +++ b/Py/qSlicerLongitudinalPETCTModuleWidget.py @@ -1162,7 +1162,10 @@ def __displayROICenterPosition(self, sliceWidget, xyPos): self.__sliceWidgetsMappersAndActors[sliceWidget] = [mpr,actr] mapper = self.__sliceWidgetsMappersAndActors[sliceWidget][0] - mapper.SetInput(gs.GetOutput()) + if vtk.VTK_MAJOR_VERSION <= 5: + mapper.SetInput(gs.GetOutput()) + else: + mapper.SetInputData(gs.GetOutput()) mapper.Update() actor = self.__sliceWidgetsMappersAndActors[sliceWidget][1] @@ -1749,4 +1752,4 @@ def __onShowEditorColorWarning(self): - \ No newline at end of file +