A computer-implemented method of determining a label set of multiple labels for anatomical substructures of an anatomical structure depicted by a medical imaging dataset, the anatomical structure comprising the multiple anatomical substructures arranged in multiple sequences, the multiple sequences of the anatomical substructures being joined at bifurcation points, wherein the method comprises: - obtaining a tree-structured segmentation of the anatomical structure in the medical imaging dataset, the tree-structured segmentation comprising multiple sequences of sections associated with the sequences of substructures of the anatomical structure, - obtaining, for each section of the tree-structured segmentation, a respective predetermined list of candidate labels and associated probabilities, - obtaining a ruleset of anatomical interrelationships between the substructures of the anatomical structure based on expert knowledge, wherein the ruleset excludes certain combinations of substructures to be in direct neighborhood and/or specifies allowed combinations of substructures to be in direct neighborhood, and - determining the label set by performing a selection, for each section of the tree-structured segmentation, from the respective predetermined list of candidate labels of a respective label based on the associated probabilities and taking into account the ruleset of anatomical interrelationships, characterized in that: wherein the selections for the sections of the tree-structured segmentation are performed in accordance with a recursive walkthrough through the tree-structured segmentation, wherein the recursive walkthrough visits at least some sections of the tree-structured segmentation multiple times to determine multiple alternative solutions for the label set. - obtaining a tree-structured segmentation of the anatomical structure in the medical imaging dataset, the tree-structured segmentation comprising multiple sequences of sections associated with the sequences of substructures of the anatomical structure, - obtaining, for each section of the tree-structured segmentation, a respective predetermined list of candidate labels and associated probabilities, - obtaining a ruleset of anatomical interrelationships between the substructures of the anatomical structure based on expert knowledge, wherein the ruleset excludes certain combinations of substructures to be in direct neighborhood and/or specifies allowed combinations of substructures to be in direct neighborhood, and - determining the label set by performing a selection, for each section of the tree-structured segmentation, from the respective predetermined list of candidate labels of a respective label based on the associated probabilities and taking into account the ruleset of anatomical interrelationships, characterized in that: wherein the selections for the sections of the tree-structured segmentation are performed in accordance with a recursive walkthrough through the tree-structured segmentation, wherein the recursive walkthrough visits at least some sections of the tree-structured segmentation multiple times to determine multiple alternative solutions for the label set. wherein the selections for the sections of the tree-structured segmentation are performed in accordance with a recursive walkthrough through the tree-structured segmentation, wherein the recursive walkthrough visits at least some sections of the tree-structured segmentation multiple times to determine multiple alternative solutions for the label set.