I have a question regarding the algorithm from vtk to use for creating a mesh out of contours I have. The contours are not necessarily parallel and the structure is a vessel with one/two branches. What is the good way to convert this contour set to a mesh in VTK/ITK?
Marco, thanks for the suggestions. I looked into the doc and can not see if it supports bifurcations. Do you know if it does? Thanks.
i’m not 100% sure but I suspect that it will try to link the last point of one bifurcation to the first of the second.
If you only have problem with branching, you can combine multiple meshes of single tubes using Boolean mesh operations. Boolean mesh filters (vtkBooleanOperationPolyDataFilter and related filter) in VTK are broken (often generate invalid results or crash for valid inputs), but you can always convert meshes to binary volumes, combine the volumes, and convert back to surface mesh. The drawback is that you may need very high resolution volume, lots of memory, and computation to minimize changes in the original mesh geometry.
Planar contours to closed surface converter in 3D Slicer’s SlicerRT extension preserves all original contour points, can handle keyholes, branching, merging, provides smooth end-capping, and it is tested with a large number of data sets. We developed it for parallel contours but with some minor modifications it would probably work for slightly non-parallel contours, too.
Since reconstruction of closed surface from contours is an extremely difficult problem, you may consider alternative approaches that avoid this. For example, if your input is a 3D volume then you may generate surface directly from the volume (after optional vessel enhancement or segmentation steps) with simpler and more robust methods.
Thanks for the code and the explanation, I will try with the tools you mentioned to see if I can get good results.
Have you resolve the problem? I meet the same requirement. Could you please share your code? Thank you very much!