Extracting the centerline of a tunnel point cloud

Hello, I am a new user of 3d slicer. Currently I am working on extracting the centerline of a tunnel. I have the tunnel as point cloud data and I have managed to use Pyvista to create the mesh. My question is can I load the point cloud data directly to 3d slicer and compute the centerline or should I do some modification?
Any tips or procedures to convert my data into the specified formats are appreciated.
Thank you.

You can get a centerline curve from a model or segmentation using VMTK extension’s Extract centerline module.

By “point cloud” do you mean you have a labelmap volume where certain points are labeled as tunnel points; or you have a list of points in a vtkPolyData in completely random positions? If it is the former then you don’t need any processing using pyvista but you can load the volume directly into Slicer.

Hello, thanks for the reply. The data I have are raw 3d data collected by a terrestrial laser scanner, thus each point is defined by an x,y,z coordinate.
If you mean by lablemap volume a voxel grid, I think I can transform the point cloud into a voxel grid in Open3d, but I dont know if there should be further modifications since the tunnel is open on entry and exit and has some branches on the sides. Plus does it need to be a solid object and not hollow on the inside?
Again much appreciated for the help.

If you use a laser scanner then probably reconstructing a surface is better representation than a labelmap volume.

If you often load such scans and you want to make it very convenient for users then you can add a module with a GUI that performs the surface reconstruction, centerline extraction, and any further analysis or processing that you may need.

I will try to construct the surface and see what I can obtain. Again thank you for your fast support and accurate descriptions. Much appreciated.

1 Like