Text this: Graph cut segmentation method and its application in medical images