The accurate knowledge of the liver structure including blood vessels topography, liver surface and lesion localizations is usually required in treatments like liver ablations and radiotherapy. In this paper, we propose an approach for automatic segmentation of liver complex geometries. It consists of applying a graph-cut method initialized by an adaptive threshold. The algorithm has been tested on 10 datasets (CT and MR). A parametric comparison with the results obtained by previous algorithms based on active contour is also carried out and discussed. Main limitations of active contour approaches result to be overcome and segmentation is improved. Feasibility to routinely use graph-cut approach for automatic liver segmentation is also demonstrated.