I need to extract center lines from airway mask, and VMTK is a very good tool.
VMTK use vtkvmtkPolyDataCenterlines to extract the center lines, and the usage of vtkvmtkPolyDataCenterlines is:
centerlineFilter = vtkvmtk.vtkvmtkPolyDataCenterlines()
centerlineFilter.SetInputData(centerlineInputSurface)
centerlineFilter.SetSourceSeedIds(inletSeedIds)
centerlineFilter.SetTargetSeedIds(outletSeedIds)
centerlineFilter.SetRadiusArrayName(self.RadiusArrayName)
centerlineFilter.SetCostFunction(self.CostFunction)
centerlineFilter.SetFlipNormals(self.FlipNormals)
centerlineFilter.SetAppendEndPointsToCenterlines(self.AppendEndPoints)
centerlineFilter.SetSimplifyVoronoi(self.SimplifyVoronoi)
centerlineFilter.SetCenterlineResampling(self.Resampling)
centerlineFilter.SetResamplingStepLength(self.ResamplingStepLength)
centerlineFilter.Update()
The inletSeedIds/outletSeedIds indicate the ids of source and target points. My question is: how can centerlineFilter obtain the real coordinate (x, y, z)? How can we input the real coordinate to centerlineFilter? For example, if I have the coordinate of two bifurcation points (calculated by other method), how can I input the bifurcation points to centerlineFilter and extract the center line?