Although anisotropic diffusion filters have been used extensively and with great success in medical image denoising, one limitation of this iterative approach, when used on fully automatic medical image processing schemes, is that the quality of the resulting denoised image is highly dependent on the number of iterations of the algorithm. Using many iterations may excessively blur the edges of the anatomical structures, while a few may not be enough to remove the undesirable noise. In this work, a mathematical model is proposed to automatically determine the number of iterations of the robust anisotropic diffusion filter applied to the problem of denoising three common human brain magnetic resonance (MR) images (T1-weighted, T2-weighted and proton density). The model is determined off-line by means of the maximization of the mean structural similarity index, which is used in this work as metric for quantitative assessment of the resulting processed images obtained after each iteration of the algorithm. After determining the model parameters, the optimal number of iterations of the algorithm is easily determined without requiring any extra computation time. The proposed method was tested on 3D synthetic and clinical human brain MR images and the results of qualitative and quantitative evaluation have shown its effectiveness.