The X-ray imaging device comprises: an X-ray source capable of moving on a prescribed movement path a moving means for moving the X-ray source on the prescribed movement path an imaging platform provided facing the X-ray source a flat X-ray detector provided on the imaging platform a marker a control unit that moves the X-ray source and causes respective images containing the marker to be taken from at least two positions and an image-processing unit that determines the position of the marker image for each image taken and determines the slope of the X-ray source movement axis with respect to the X-ray detector based on the relationship between the positions of the marker images.