I am using the vmtksurfaceendclipper script to clip the extremities of a segmentation and the output surface often contains either an extra or missing triangle part:
vmtksurfaceendclipper -ifile "C:/temp/debug-clip-3/input.vtk" -ofile "C:/temp/debug-clip-3/output.vtk"
I tried to process the script step by step and it seems that the extra/missing part is always connected to the (closest) point on the input surface provided via the
SetClosestPoint method to the seamFilter. The issue is then visible on the vtkClipPolyData output:
# vmtkSurfaceEndClipper.py line 311
seamFilter = vtkvmtk.vtkvmtkTopologicalSeamFilter()
clipper = vtk.vtkClipPolyData()
Is there any modification I could make to the seamFilter or the Clipper to fix this issue ? Or any post processing of the surface I could try ?
I found this issue on VMTK Github (vmtksurfaceendclipper does not work consistently · Issue #169 · vmtk/vmtk · GitHub) that seems related to this problem.
Thanks a lot for any suggestion,