Abstract. Assume that a simplified liver model consists of some vein cells and liver cells. Such a liver model contains two kinds of components, the vein component and the liver components, each of them consists of cells which are 26-connected. The vein component has a tree-shape topology. Suppose that the vein component has already been cut into two parts, and one of them is diseased. Liver surgery planning systems need to design an algorithm to decompose the liver components into two kinds of subsets, one (usually just one component) that has been affected by the diseased vein component while the other one is still healthy. So far, existing algorithms depend heavily on surgeons' personal expertise to detect the diseased liver component which needs to be removed. We propose an efficient algorithm for computing the diseased liver component which is based on the diseased vein component, and not on surgeons' personal manipulations.