From 8b7022dd45f354a416867c257f8bdc254afe4e14 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Fri, 13 Jan 2017 23:15:52 +0000 Subject: [PATCH] Changes of VTKRendering due to possibility to compile VTK7 --- trisurf/VTKRendering.py | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/trisurf/VTKRendering.py b/trisurf/VTKRendering.py index 97b06ae..44fe699 100644 --- a/trisurf/VTKRendering.py +++ b/trisurf/VTKRendering.py @@ -1,9 +1,10 @@ import os,sys from . import trisurf -if sys.version_info<(3,0): +try: from vtk import * - - +except: + print("Vtk rendering works if you manually install vtk7 for python3") + exit(1) class MultiRender: def __init__(self,args,host): @@ -51,7 +52,7 @@ output = reader.GetOutput() scalar_range = output.GetScalarRange() mapper = vtkDataSetMapper() - mapper.SetInput(output) + mapper.SetInputData(output) mapper.SetScalarRange(scalar_range) # Create the Actor @@ -130,7 +131,7 @@ output = reader.GetOutput() scalar_range = output.GetScalarRange() mapper = vtkDataSetMapper() - mapper.SetInput(output) + mapper.SetInputData(output) mapper.SetScalarRange(scalar_range) # Create the Actor -- Gitblit v1.9.3