Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions internal/devide_canvas/devide_canvas_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,10 @@ def _create_geometry(self):
m = vtk.vtkPolyDataMapper()
# the BeveledEdgeBlock() polydata is created during construction, so
# we use SetInputData() here.
m.SetInputData(self._beb.polydata)
if vtk.VTK_MAJOR_VERSION <= 5:
m.SetInput(self._beb.polydata)
else:
m.SetInputData(self._beb.polydata)
self._rbsa.SetMapper(m)

# we need Phong shading for the gradients
Expand All @@ -600,7 +603,10 @@ def _create_geometry(self):

m = vtk.vtkPolyDataMapper()
# SelectionBlock.polydata is kept up to date explicitly
m.SetInputData(self._selection_block.polydata)
if vtk.VTK_MAJOR_VERSION <= 5:
m.SetInput(self._selection_block.polydata)
else:
m.SetInputData(self._selection_block.polydata)
a = vtk.vtkActor()
a.SetMapper(m)
a.GetProperty().SetOpacity(0.3)
Expand All @@ -611,7 +617,10 @@ def _create_geometry(self):
# GLYPH BLOCKED OVERLAY #######################################
m = vtk.vtkPolyDataMapper()
# FilledBlock.polydata is kept up to date explicitly
m.SetInputData(self._blocked_block.polydata)
if vtk.VTK_MAJOR_VERSION <= 5:
m.SetInput(self._blocked_block.polydata)
else:
m.SetInputData(self._blocked_block.polydata)
a = vtk.vtkActor()
a.SetMapper(m)
a.GetProperty().SetOpacity(0.3)
Expand Down
5 changes: 4 additions & 1 deletion modules/viewers/DICOMBrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,10 @@ def _serialise_study_dict(self, study_dict):
def _set_image_viewer_dummy_input(self):
ds = vtk.vtkImageGridSource()
ds.Update()
self._image_viewer.SetInputData(ds.GetOutput())
if vtk.VTK_MAJOR_VERSION <= 5:
self._image_viewer.SetInput(ds.GetOutput())
else:
self._image_viewer.SetInputData(ds.GetOutput())


def _setup_image_viewer(self):
Expand Down
5 changes: 4 additions & 1 deletion modules/viewers/slice3dVWRmodules/sliceDirections.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ def _createSlice(self, sliceName):
self._setSliceInteraction(sliceName, True)

# and initialise the output polydata
self.ipwAppendPolyData.AddInputData(newSD.primaryPolyData)
if vtk.VTK_MAJOR_VERSION <= 5:
self.ipwAppendPolyData.AddInput(newSD.primaryPolyData)
else:
self.ipwAppendPolyData.AddInputData(newSD.primaryPolyData)

return newSD

Expand Down
10 changes: 8 additions & 2 deletions modules/viewers/slice3dVWRmodules/tdObjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ def addObject(self, tdObject):
elif tdObject.GetClassName() == 'vtkPolyData':
mapper = vtk.vtkPolyDataMapper()
mapper.ImmediateModeRenderingOn()
mapper.SetInputData(tdObject)
if vtk.VTK_MAJOR_VERSION <= 5:
mapper.SetInput(tdObject)
else:
mapper.SetInputData(tdObject)
actor = vtk.vtkActor()
actor.SetMapper(mapper)

Expand Down Expand Up @@ -259,7 +262,10 @@ def updateObject(self, prevObject, newObject):
# record the new object ###################################
objectDict['tdObject'] = newObject
mapper = objectDict['vtkActor'].GetMapper()
mapper.SetInputData(newObject)
if vtk.VTK_MAJOR_VERSION <= 5:
mapper.SetInput(newObject)
else:
mapper.SetInputData(newObject)
self._tdObjectsDict[newObject] = objectDict

# set the new scalar range ################################
Expand Down