1. A system ( 200 ) for delineating an anatomical structure in an image computed from a slice of image data, the system ( 200 ) comprising: a computer processor executing a partition unit ( 210 ) configured to partition the image into a plurality of image portions, each image portion depicting a portion of the anatomical structure; and a computer processor executing an adaptation unit ( 220 ) configured to adapt a template to the image, based on a criterion function, the criterion function being a function of template parameters and of image values and their relative positions in the image, and on a criterion to be satisfied by a computed value of the criterion function, wherein the criterion function is defined on the basis of the plurality of image portions.