VTK/Examples/Python/VTPReader

From KitwarePublic
< VTK‎ | Examples‎ | Python
Jump to navigationJump to search

VTPReader.py

reader = vtk.vtkXMLPolyDataReader()
path = os.path.join(constant.BASE_DIR, "archive.vtp") #Archive path
reader.SetFileName(path)
reader.Update()

mapper = vtk.vtkPolyDataMapper()
mapper.SetInput(reader.GetOutput())

actor = vtk.vtkActor()
actor.SetMapper(mapper)