This work describes the problem of medical image segmentation. The goal of this work was to develop a segmentation algorithm, that could process complicated medical images, that where acquired with computer tomography. A new modified segmentation algorithm, that is based on classic FOREL algorithm is suggested. This paper describes the algorithm. Suggested algorithm works better than the classic FOREL and can be used to segment medical images and help physicians make a more precise medical image analysis.