1. A method for segmenting image data for detecting a liver of a subject under examination, wherein the image data include a number of pixels, each pixel including one signal value allocated thereto, the method comprising: determining, as rib pixels, pixels which represent a rib of the subject under examination; determining pixels which delimit an area inside a rib cage of the subject under examination, with the aid of the determined rib pixels; determining at least one pixel which represents a pixel of the liver of the subject under examination as a liver pixel, within pixels which are located in an area inside the rib cage; defining, as background seed points, the determined rib pixels and the determined pixels which delimit the area inside the rib cage; defining, as liver seed points, the at least one determined liver pixel; and determining a probability, for each pixel of an area inside the rib cage, as to whether the pixel belongs to the liver or not, with the aid of a Random Walker method, with the aid of the defined liver seed points and with the aid of the defined background seed points.