The invention relates to a device and to an associated method. A housing unit can be aligned by means of a securing unit which is connected to said housing and it can be controlled in such a way that the diaphragm unit which is connected to the x-ray source and is arranged in the housing unit can be aligned in accordance with a specified position.