A method for effective sequence searching of algorithms processing medical data during segmentation of anatomical structures of the heart