Measure Diameter using centerline length and surface

I am trying to extract the radius at each point on the centerline from my tubular mesh. I am using the vmtk script vmtkDistanceToCenterlines and setting the variable EvaluateCenterlineRadius = True.

I was expecting this function to return a radius for each function on the centerline, however, the number of points returned is equal to the number of points in the surface mesh. I am confused with what this result signifies and I am wondering if there is a way to extract what I am interested in.

    distance_calculator = vmtkscripts.vmtkDistanceToCenterlines()
    distance_calculator.Surface = output_surface
    distance_calculator.Centerlines = centerline_points
    distance_calculator.UseCombinedDistance = False
    distance_calculator.UseRadiusInformation = False
    distance_calculator.EvaluateCenterlineRadius = True
    distance_calculator.ProjectPointArrays = False
    distance_calculator.UseCombinedDistance = False



    distance_calculator.RadiusArrayName = "Radius"    
    distance_calculator.Execute()
    distance = distance_calculator.Surface
    distance_to_centerline = distance.GetPointData().GetArray("Radius")```

Thank you all in advance for your help.

If your requirements do not confine you to vmtkscripts, you may consider using Slicer itself.

By installing SlicerVMTK extension using the extensions manager, you’ll find Cross-section analysis module that does what you want, and much more.