1. A method for identifying a structure within a patient image, comprising: generating a reference image from an image of the patient; generating a template from at least a portion of the reference image, the template comprising a set of patches; for each patch, generating a patch similarity map by computing a local similarity measure between the patient image and the patch for the template located at each of several candidate locations for the structure in the patient image; combining the patch similarity maps according to spatial relationships among the set of patches in the template to obtain a global similarity map; and identifying the structure from a template location in the patient image that corresponds to a maximum value for the global similarity map.