How to get the shortest path from a fiducialmarkupnode to a curvenode

i create a curve use several control points (yellow arrow)
and then i create a point (red arrow)
i want to get the projection point from the point(right arrow) to the curve(yellow arrow) , whick means get the point in the curve which has the shortest path to the point

(PS. I try to change the curve into a model node and use FiducialsToModelDistance to get the shortest path , but it failed , the output is always (0,0,0) )

You could try vtkMRMLMarkupsCurveNode::GetClosestPointPositionAlongCurveWorld().


thank you @Sunderlandkyl ,it’s really work!!

1 Like