diff --git a/Testing/Python/ReportingSelfTest.py b/Testing/Python/ReportingSelfTest.py index 67ff633..ac78d87 100644 --- a/Testing/Python/ReportingSelfTest.py +++ b/Testing/Python/ReportingSelfTest.py @@ -386,7 +386,10 @@ def test_ReportingAIMRoundTrip(self): labelDisplayNode.SetAndObserveColorNodeID('vtkMRMLColorTableNodeFileGenericAnatomyColors.txt') image = volume.GetImageData() thresh = vtk.vtkImageThreshold() - thresh.SetInput(image) + if vtk.vtkVersion().GetVTKMajorVersion() < 6: + thresh.SetInput(image) + else: + thresh.SetInputData(image) thresh.ThresholdBetween(10,400) thresh.SetInValue(report.GetFindingLabel()) thresh.SetOutValue(0) diff --git a/Util/LabelToDICOMSEGConverter/Testing/Python/LabelToDICOMSEGConverterSelfTest.py b/Util/LabelToDICOMSEGConverter/Testing/Python/LabelToDICOMSEGConverterSelfTest.py index 27ce82d..9065a4b 100644 --- a/Util/LabelToDICOMSEGConverter/Testing/Python/LabelToDICOMSEGConverterSelfTest.py +++ b/Util/LabelToDICOMSEGConverter/Testing/Python/LabelToDICOMSEGConverterSelfTest.py @@ -336,7 +336,10 @@ def test_LabelToDICOMSEGConverterRoundTrip(self): labelDisplayNode.SetAndObserveColorNodeID('vtkMRMLColorTableNodeFileGenericAnatomyColors.txt') image = volume.GetImageData() thresh = vtk.vtkImageThreshold() - thresh.SetInput(image) + if vtk.vtkVersion().GetVTKMajorVersion() < 6: + thresh.SetInput(image) + else: + thresh.SetInputData(image) thresh.ThresholdBetween(10,400) thresh.SetInValue(10) thresh.SetOutValue(0) @@ -384,7 +387,10 @@ def test_LabelToDICOMSEGConverterRoundTrip(self): image = volume.GetImageData() previousImage = thresh.GetOutput() diff = vtk.vtkImageDifference() - diff.SetInput(thresh.GetOutput()) + if vtk.vtkVersion().GetVTKMajorVersion() < 6: + diff.SetInput(thresh.GetOutput()) + else: + diff.SetInputData(thresh.GetOutput()) diff.SetImage(image) diff.Update() if diff.GetThresholdedError() > 1: