One of the ways to diagnose cancer is to obtain images of the cells under the microscope through biopsies. Because the images of the stained cells are very complicated, there is a great deal of interference with the doctor's observations. To address this issue, we propose a new method for segmenting glandular cavity from gastric cancer cell images. Our method combines local correntropy-based K-means (LCK) clustering method and morphological operations to divide the image into complete glandular cavity and remove all extra-cavity interference areas. Our method does not require human interaction. The acquired image boundary features and internal information are complete, allowing doctors to diagnose cancer more quickly and efficiently.