| | |
| | | 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): |
| | |
| | | output = reader.GetOutput() |
| | | scalar_range = output.GetScalarRange() |
| | | mapper = vtkDataSetMapper() |
| | | mapper.SetInput(output) |
| | | mapper.SetInputData(output) |
| | | mapper.SetScalarRange(scalar_range) |
| | | |
| | | # Create the Actor |
| | |
| | | interactor = vtkRenderWindowInteractor() |
| | | interactor.SetRenderWindow(self.renderer_window) |
| | | interactor.Initialize() |
| | | interactor.AddObserver("TimerEvent", self.RenderUpdate) |
| | | interactor.AddObserver("TimerEvent", self.RenderUpdate) |
| | | timerIDR = interactor.CreateRepeatingTimer(1000) |
| | | interactor.Start() |
| | | |
| | | return |
| | | |
| | | def lastVTU(self): |
| | |
| | | output = reader.GetOutput() |
| | | scalar_range = output.GetScalarRange() |
| | | mapper = vtkDataSetMapper() |
| | | mapper.SetInput(output) |
| | | mapper.SetInputData(output) |
| | | mapper.SetScalarRange(scalar_range) |
| | | |
| | | # Create the Actor |