The invention relates to tracking motion of a patient's jaw, wherein motion of a tracking item which represents motion of the jaw is followed by at least one camera arranged to a medical x-ray imaging apparatus and wherein the motion detected by the at least one camera is applied on a digital model depicting hard tissue of the jaw. The moving digital model of the hard tissue of the jaw thus generated is shown on a display to visualize movement of the hard tissue.