Commit f588e41a186b706f822a71e39d029b88aab28f6e
1 parent
f51956d0
Exists in
master
and in
67 other branches
FIX: polydata.BuildLinks in VTK5.6 needs an int as argument
Showing
1 changed file
with
8 additions
and
2 deletions
Show diff stats
invesalius/data/surface.py
@@ -35,7 +35,10 @@ import session as ses | @@ -35,7 +35,10 @@ import session as ses | ||
35 | import surface_process | 35 | import surface_process |
36 | import utils as utl | 36 | import utils as utl |
37 | import vtk_utils as vu | 37 | import vtk_utils as vu |
38 | -import data.ca_smoothing as ca_smoothing | 38 | +try: |
39 | + import data.ca_smoothing as ca_smoothing | ||
40 | +except: | ||
41 | + pass | ||
39 | 42 | ||
40 | class Surface(): | 43 | class Surface(): |
41 | """ | 44 | """ |
@@ -532,7 +535,10 @@ class SurfaceManager(): | @@ -532,7 +535,10 @@ class SurfaceManager(): | ||
532 | polydata.SetSource(None) | 535 | polydata.SetSource(None) |
533 | del clean | 536 | del clean |
534 | 537 | ||
535 | - polydata.BuildLinks() | 538 | + try: |
539 | + polydata.BuildLinks() | ||
540 | + except TypeError: | ||
541 | + polydata.BuildLinks(0) | ||
536 | polydata = ca_smoothing.ca_smoothing(polydata, options['angle'], | 542 | polydata = ca_smoothing.ca_smoothing(polydata, options['angle'], |
537 | options['max distance'], | 543 | options['max distance'], |
538 | options['min weight'], | 544 | options['min weight'], |