A method for compensating the sagging of a pallet of the patient table includes: detecting a degree of sagging of a position on the pallet where a scanning cross section is located determining whether the degree of sagging is smaller than a predetermined degree, and ending the procedure if the degree of sagging is smaller than the predetermined degree otherwise, determining an adjustment amount of the pallet according to the degree of sagging, and lifting the pallet according to the adjustment amount. An apparatus includes a detecting device a lifting device and a controller. If a detected value of the degree of sagging is smaller than a predetermined value, the controller ends the procedure otherwise, the controller is configured to determine an adjustment amount of the pallet according to the degree of sagging, and control the lifting device to lift the pallet according to the adjustment amount.