A medical imaging device and a method controlling one or more parameters of a medical imaging device are disclosed. The method comprises receiving image data representing a first image of an object to be imaged using the radiation source to form a second image and detecting a plurality of positions of respective predetermined features in the first image. On the basis of the detected positions, a boundary of an imaging area of the object to be imaged is determined. Based on the determined boundary, one or more parameters of the radiation source unit are controlled.