A computer-implemented method for determining, before positioning in a vascular structure, the final length of a self-expanding stent, the final length being the length of the stent after positioning, and the stent having a nominal length when it is left freely outside a vessel, the method comprising following steps: a) obtaining a three-dimensional image of the vascular structure in which the stent will be positioned, and tracing, by a computer, a centreline of said vascular structure in the three-dimensional image, defining the exact location of an initial point at which said stent will be positioned and dividing said centreline of the vascular structure into small segments; b) measuring, by the computer, on the three-dimensional image descriptor parameters of the morphology of said vascular structure for a first segment of said traced centreline which starts from said initial point at which said stent will be positioned in said vascular structure, wherein said descriptor parameters of the vascular morphology are chosen from a group, the group comprising: the average radius, a maximum inscribed sphere radius, a cross sectional area, a perimeter of the cross section, a minimum radius of the cross section, a maximum radius of the cross section, a curvature/torsion or any combination thereof; characterized in that the method further comprises: c) calculating, by the computer, a length of a stent section at its nominal length for said first segment of said traced centreline using an indicator ratio of the change in length of the stent as a function of a local morphology of the vascular structure; and d) subtracting, by the computer, said calculated length of a stent section from the nominal length of the stent to obtain a new nominal length; if said new nominal length is different from 0 then steps b) to d) will be repeated for the segment of the traced centreline contiguous to the preceding segment; if the new nominal length is 0, all the lengths of each segment of the traced centreline will be added together, and this sum will be the final length of said stent after positioning. a) obtaining a three-dimensional image of the vascular structure in which the stent will be positioned, and tracing, by a computer, a centreline of said vascular structure in the three-dimensional image, defining the exact location of an initial point at which said stent will be positioned and dividing said centreline of the vascular structure into small segments; b) measuring, by the computer, on the three-dimensional image descriptor parameters of the morphology of said vascular structure for a first segment of said traced centreline which starts from said initial point at which said stent will be positioned in said vascular structure, wherein said descriptor parameters of the vascular morphology are chosen from a group, the group comprising: the average radius, a maximum inscribed sphere radius, a cross sectional area, a perimeter of the cross section, a minimum radius of the cross section, a maximum radius of the cross section, a curvature/torsion or any combination thereof; c) calculating, by the computer, a length of a stent section at its nominal length for said first segment of said traced centreline using an indicator ratio of the change in length of the stent as a function of a local morphology of the vascular structure; and d) subtracting, by the computer, said calculated length of a stent section from the nominal length of the stent to obtain a new nominal length; if said new nominal length is different from 0 then steps b) to d) will be repeated for the segment of the traced centreline contiguous to the preceding segment; if the new nominal length is 0, all the lengths of each segment of the traced centreline will be added together, and this sum will be the final length of said stent after positioning.