Actual ultrasound attenuation in tissue is used to calculate gain compensation profiles which are used to create a uniform image. Axial, lateral, elevation gain profiles are used to correct the attenuation and ultrasound variation in each direction. In addition, automatic activation of the automatic gain compensation is described.