A method for generating a panoramic image of a patient includes obtaining a digital 3D surface representation of at least a part of the patient's teeth; using the obtained digital 3D surface representation to define a customized path following the arch form of the patient's teeth; obtaining a plurality of x-ray images of at least a part of one of the patient's jaws and/or teeth; and generating the panoramic image of the patient using the customized path.