The paper considers a method for determining the effective sequence of steps during the processing of medical images, in particular, related to the problem of delineation the anatomical structures of the heart. First, we proposed the metric called the Optimality Index (OI) that is a weighted average of several accuracy coefficients, indices, and mean processing time. The metric allows to estimate how fast and accurate each image processing algorithm is. Moreover, the Optimality Index varies from 0 to 1, which facilitates the comparison of different approaches. The second thing is concerned with comparison of filtering, sharpening, and segmentation technique. All the obtained results are analysed and interpreted by dint of the new metric (OI). During noise reduction step, we compared Median filter, Total Variation filter, Bilateral filter, Curvature Flow filter, Nonlocal Means filter, and Mean Shift filter. To clarify the borders of anatomical structures we used Linear sharpen. Lastly, we applied Watershed segmentation, Clusterization, Region growing segmentation, Morphological segmentation, Image Foresting segmentation, and Isoline delineation as segmentation techniques. All the research studies were performed on a static frame from a series of images obtained as part of an echocardiographic study of the heart.