In a method for automatic adjustment of a diaphragm in an x-ray system,
the diaphragm having a number of adjustable diaphragm elements for a
subsequent x-ray exposure of an examination subject, the individual
diaphragm elements are respectively positioned such that, considered in a
projection lying in a detector plane, abut the contours of the
acquisition subject or are situated at a small distance therefrom for
this positioning, first a subject localization exposure is generated with
a low radiation dose with an open diaphragm. This subject localization
exposure is analyzed to determine contours of the exposure subject. The
positions of the diaphragm elements are calculated using the determined
contours, and then the diaphragm elements are moved into the calculated
positions.