Methods, apparatus and computer program products implementembodiments of the present invention that include receivingthree-dimensional (3D) image data with respect to a 3D regionincluding body tissue in a living body, and segmenting the 3Dimage data so as to identify a cavity within the body tissue anda wall surrounding the cavity. For each point among a pluralityof points in the cavity, a respective minimum distance from thepoint to the wall is found, and among the plurality of thepoints, a set of one or more points for which the respectiveminimum distance is a local maximum relative to neighboringpoints in the plurality is found. One of the points in the setfor which the respective minimum distance is minimal among theone or more points in the set is then identified as an entranceto the cavity.