A method for extracting a centerline of a tubular structure in a digital medical image includes providing a 3-dimensional (3D) digitized medical image having a segmented tubular structure, finding a path in the image between a starting point and every other point in the tubular structure that minimizes an accumulative cost function, wherein the minimum accumulative cost φ(x) at a point x is a minimum of (φ(x′)+Px,x′) over all nearest neighbors x′ wherein Px,x′ is a cost of propagation obtained from the inverse of a medialness measure computed in a plane orthogonal to a line between x and x′ that is centered at a mid-point of the line, the medialness measure m(x) computed in a circular region C(x, R) centered at point x on the linr, with radius R, given by
wherein {right arrow over (u)}(α)=sin(α){right arrow over (u)}1+cos(α){right arrow over (u)}2 and {right arrow over (u)}1 and {right arrow over (u)}2 define a 2D plane, and f(x0,R{right arrow over (u)}(α)) is
wherein M is the number of background points.