Apparatus is described for use with an imaging device (31) that acquires a pre-procedure image of a portion of a subjects body disposed at a pre-procedure position. An input unit receives from a user an indication of two or more lines within the image that correspond to respective branches of a multi-branch luminal structure. A probe (1) moves within the portion along two or more lines in the structure that respectively correspond to the two or more lines within the image. A location sensor (18) coupled to the probe senses location coordinates along the two or more lines, while the portion is at a current position. A control unit (34) registers the image of the portion with the portions current position by registering (a) the two or more lines within the image, with (b) the location coordinates along the two or more lines. Other embodiments are also described.