I’m trying to skeletonize a 3D volume n VMTK using the following code in python
vmtkCommand = '''vmtksurfacereader -ifile foo.stl --pipe vmtksurfacewriter -ofile foo_net.vtp''' p = pypes.PypeRun(vmtkCommand) networkExtraction = vmtkscripts.vmtkNetworkExtraction() networkExtraction.Surface = 'foo_net.vtp' networkExtraction.Execute() network = networkExtraction.Network
But I get the following error while passing
surface in the line networkExtraction.Surface = ‘foo_net.vtp’.
line 23, in <module> networkExtraction.Execute() networkExtraction.SetInputData(self.Surface) TypeError: SetInputData argument 1: method requires a VTK object
Any suggestions to how to resolve this error will be really helpful.