1. A method of segmenting an anatomic entity in a digital medical image comprising: defining, for each of a number of landmarks in said image, an initial position of said landmark, calculating a graph data structure for all landmark points, each node (vertex) representing a landmark and each edge (arc) representing a connection between a pair of landmarks; calculating a path through the graph data structure either in a systematic way or in a random way; sampling a neighborhood around said initial position, said neighborhood comprising a number of candidate locations of said landmark, associating a cost with each of said candidate locations, optimizing a cost function expressing a weighted sum of overall gray level cost and overall shape cost for all candidate locations, calculating a segmented anatomic entity as a surface or volume through a selected combination of said candidate locations for each landmark for which combination said cost function is optimized, the order of visiting the landmarks determined by said path through the graph data structure, said path being a minimum spanning tree (MST).