How to get the path between the root and a branch

Hello Team,
I have a centerline tree extracted from trachea. The centerline tree contains many discrete points. It can be visualized in the renderwindow correctly. The work I want to achieve is to build a path from the root to a branch. The root point and the branch point are known in advance. I consider it is not a difficulty problem. But I have not find an easy way to realize it.
The centerline tree is saved in a vtp file. I guess that the vtp file contains points and connectionships. But I cannot find a appropriate vtk function to find the path from the root to a branch.

Thanks and kind regards!