A computer-implemented method of determining one or more position and/or orientation parameters of an anatomical structure of a body portion, wherein the anatomical structure has a longitudinal shape defining a longitudinal axis; wherein the method comprises: generating and/or reading, by a data processing system, volumetric data of at least a portion of a subject; generating, by the data processing system, a deformable template which provides an estimate for a location of the longitudinal axis in the portion of the subject; matching, by the data processing system, the deformable template to the volumetric data, thereby obtaining a matched template; wherein the matching comprises using one or more internal energy functions ( E int) and one or more external energy functions ( E ext) for optimizing an objective function; and determining, by the data processing system, the at least one position and/or orientation parameter based on the matched template; wherein the deformable template represents a plurality of curves, each of which being an approximation for the longitudinal axis, and wherein each of the curves is at least partially defined using a plurality of position adjustable control points (15a,... 15i); wherein the deformable template comprises, for each of the control points (15a,... 15i), at least one discrete search space having a plurality of search space points for positioning the adjustable control points (15a,... 15i); characterized in that at least one of the following (a) and (b) holds true: (a) for at least a portion of the control points (15a,... 15i), the search spaces (16a,... 16i,) of the control points (15a,... 15i) are mutually non-overlapping; and/or the search space points for the respective control point (15a,... 15i) form a plane or curved surface; and/or (b) characterized in that at least one of the internal energy functions depends on a distance of one or more of the control points of the template from a prototype of the deformable template, wherein the prototype describes one of the plurality of curves represented by the deformable template. generating and/or reading, by a data processing system, volumetric data of at least a portion of a subject; generating, by the data processing system, a deformable template which provides an estimate for a location of the longitudinal axis in the portion of the subject; matching, by the data processing system, the deformable template to the volumetric data, thereby obtaining a matched template; wherein the matching comprises using one or more internal energy functions ( E int) and one or more external energy functions ( E ext) for optimizing an objective function; and determining, by the data processing system, the at least one position and/or orientation parameter based on the matched template; wherein the deformable template represents a plurality of curves, each of which being an approximation for the longitudinal axis, and wherein each of the curves is at least partially defined using a plurality of position adjustable control points (15a,... 15i); wherein the deformable template comprises, for each of the control points (15a,... 15i), at least one discrete search space having a plurality of search space points for positioning the adjustable control points (15a,... 15i); characterized in that at least one of the following (a) and (b) holds true: (a) for at least a portion of the control points (15a,... 15i), the search spaces (16a,... 16i,) of the control points (15a,... 15i) are mutually non-overlapping; and/or the search space points for the respective control point (15a,... 15i) form a plane or curved surface; and/or (b) characterized in that at least one of the internal energy functions depends on a distance of one or more of the control points of the template from a prototype of the deformable template, wherein the prototype describes one of the plurality of curves represented by the deformable template. (a) for at least a portion of the control points (15a,... 15i), the search spaces (16a,... 16i,) of the control points (15a,... 15i) are mutually non-overlapping; and/or the search space points for the respective control point (15a,... 15i) form a plane or curved surface; and/or (b) characterized in that at least one of the internal energy functions depends on a distance of one or more of the control points of the template from a prototype of the deformable template, wherein the prototype describes one of the plurality of curves represented by the deformable template.