A first and a second image are expressed in a common coordinate system by applying a geometric transformation to the second image so as to map a structure in the second image onto a corresponding structure in the first image in a common coordinate system. Starting from initial values, the parameters of the geometric transformation are updated taking into account the result of an evaluation of a cost function. Measurements are performed in the common coordinate system.