Medical image segmentation based on mutual information maximization