Positional relationships are automatically determined with higher accuracy in a predetermined direction between three-dimensional images representing a subject including a periodic structure having periodicity in the predetermined direction, with respect to the periodic structure. A positional correspondence is provisionally determined in a predetermined direction between two three-dimensional images including a periodic structure having periodicity in the predetermined direction, based on a criterion wherein the periodic structure contributes less to the determination. The provisionally determined correspondence is then corrected so that a position in one of the three-dimensional images corresponding to a position of the other three-dimensional image in the predetermined direction can be corrected within a range near the position in the former three-dimensional image in the predetermined direction, according to a criterion wherein the periodic structure contributes more.