Commit e72e757bcd184546e7ec49743c490676ed0bd4e6
1 parent
396a0264
Exists in
master
and in
28 other branches
It wasn't showing surface when opening a inv3 proj
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
invesalius/data/surface.py
| ... | ... | @@ -351,6 +351,7 @@ class SurfaceManager(): |
| 351 | 351 | surface_dict = pubsub_evt.data |
| 352 | 352 | for key in surface_dict: |
| 353 | 353 | surface = surface_dict[key] |
| 354 | + | |
| 354 | 355 | # Map polygonal data (vtkPolyData) to graphics primitives. |
| 355 | 356 | normals = vtk.vtkPolyDataNormals() |
| 356 | 357 | normals.SetInputData(surface.polydata) |
| ... | ... | @@ -358,14 +359,14 @@ class SurfaceManager(): |
| 358 | 359 | normals.AutoOrientNormalsOn() |
| 359 | 360 | # normals.GetOutput().ReleaseDataFlagOn() |
| 360 | 361 | |
| 361 | - # Improve performance | |
| 362 | + # Improve performance | |
| 362 | 363 | stripper = vtk.vtkStripper() |
| 363 | - stripper.SetInputData(normals.GetOutput()) | |
| 364 | + stripper.SetInputConnection(normals.GetOutputPort()) | |
| 364 | 365 | stripper.PassThroughCellIdsOn() |
| 365 | 366 | stripper.PassThroughPointIdsOn() |
| 366 | 367 | |
| 367 | 368 | mapper = vtk.vtkPolyDataMapper() |
| 368 | - mapper.SetInputData(stripper.GetOutput()) | |
| 369 | + mapper.SetInputConnection(stripper.GetOutputPort()) | |
| 369 | 370 | mapper.ScalarVisibilityOff() |
| 370 | 371 | mapper.ImmediateModeRenderingOn() # improve performance |
| 371 | 372 | ... | ... |