There is provided a method for at least partly determining the orientation of an edge-on x-ray detector with respect to the direction of x-rays from an x-ray source. The method includes obtaining (S1) information from measurements, performed by the x-ray detector, representing the intensity of the x-rays at a minimum of two different relative positions of a phantom in relation to the x-ray detector and the x-ray source, the phantom being situated between the x-ray source and the x-ray detector and designed to embed directional information in the x-ray field when exposed to x-rays. The method also includes determining (S2) at least one parameter associated with the orientation of the x-ray detector with respect to the direction of x-rays based on the obtained information from measurements and a geometrical model of the spatial configuration of the x-ray detector, x-ray source and phantom.