| Input: |
| (i) : the upper anterior corner of the first vertebra |
| (ii) : the lower anterior corner of the last vertebra |
| (iii) : the set of all the detected points |
| Data: |
| (i) : a sequence of points |
| (ii) : a set of sequences composed by points |
| Result: |
| (i) : the sequence of points minimizing the path between and |
| begin |
| ; |
| ; |
| ; |
| RecursiveFunction ; |
| min = distance between and in ; |
| |
| for do |
| dist = distance between and in ; |
| if then |
| ; |
| ; |
| ; |