How to use VMTK split the vessel tree's branch?

My purpose is to get the branched segmentation file(such as .nii.gz, .mhd) and the centerline file from the whole binary vessel tree.
@lassoan @lantiga

  1. How can I convert the centerline (vtkPolyData) obtained by vtkvmtkPolyDataCenterlines() into numpy array or .nii.gz file similar to the original mask?

  2. The vtkvmtkPolyDataCenterlines is very slowly in my lung vessel tree data. Does anyone have idea to accerelate the speed? Besides, I found that the centerline obtained by vtkvmtkPolyDataNetworkExtractionis faster than vtkvmtkPolyDataCenterlines, but its output seem to can not be used for input of vtkvmtkCenterlineBranchExtractor?

  3. According to the obtained centerline, How can I split the branch of original mask by assign different labels to each branch? I checked the class list of VMTK, and find vtkvmtkUnstructuredGridCenterlineGroupsClipper or vtkvmtkPolyDataCenterlineGroupsClipper maybe satisfy my needs, but both methods encountered problems:

  • The mask is readed as structuredGrid uses vmtkImageReader() , and input to vtkvmtkUnstructuredGridCenterlineGroupsClipper will report an error.
  • vtkvmtkPolyDataCenterlineGroupsClipper will output the splitted surface, How can I convert it into a volume and output a .nii.gz file?

Look forward to your reply
Thanks.
image

1 Like

What’s the difference of vtkvmtkPolyDataNetworkExtraction() and vtkvmtkPolyDataCenterlines() ?
I find that:

  1. speed. The vtkvmtkPolyDataNetworkExtraction() is faster than vtkvmtkPolyDataCenterlines() , and sametime, the number of points in centerline network is less than in centerline polydata. Does vtkvmtkPolyDataNetworkExtraction() only contain the endpoints of each line?How can I resample the centerline network(vtkPolyData) to get the centerline volume that’s size is consistent with the original mask?

  2. accuracy. vtkvmtkPolyDataNetworkExtraction() seems to be less accurate than vtkvmtkPolyDataCenterlines() in blood vessels. But the vtkvmtkPolyDataCenterlines() can easily get the flying centerlines(out of vessel) on small blood veesels. So, I prefer the vtkvmtkPolyDataNetworkExtraction().

flying centerlines example from How to obtain the complete center lines using VMTK?

You can find all the details in Luca Antiga’s PhD Thesis. In short:

  • network extraction just provides geometrical medial line network; it is fast and simple and can create map of any topology (for example, it may contain loops)
  • centerline extraction provides a tree of centerlines that makes anatomical sense (not just geometrical)

I’ve noticed that automatically centerline endpoints computed by network extraction are not applicable directly as input to centerline extraction. You probably could solve this by moving endpoints automatically to the closest point on the Voronoi surface (or maybe slightly further along). If you fix it then it would be nice if you could send a pull request to help others.