In this paper, a new universal measure of medical images quality is proposed. The measure is based on the analysis of the image by using gradient methods. The number of isolated peaks in the examined image, as a function of the threshold value, is the basis of the assessment of the image quality. It turns out that for higher quality images the curvature of the graph of the said function has a higher value for lower threshold values. On the basis of the observed property, a new method of no-reference image quality assessment has been created. The experimental verification confirmed the method efficiency. The correlation between the arrangement depending on the image quality done by an expert and by using the proposed method is equal to 0.74. This means that the proposed method gives a correlation of higher than the best methods described in the literature. The proposed measure is useful to maximize the image quality while minimizing the time of medical examination.