A method is provided for generating a deformable model (300) for segmenting an anatomical structure in a medical image. The anatomical structure comprises a wall. The deformable model (300) is generated such that it comprises, in addition to two surface meshes (320, 360), an intermediate layer mesh (340) for being applied in-between a first surface layer of the wall and a second surface layer of the wall. In generating the intermediate layer mesh (340), the mesh topology of at least part (400) of the intermediate layer mesh is matched to the mesh topology of one of the surface meshes (320, 360), thereby establishing matching mesh topologies. The deformable model (300), as generated, better matches the composition of such walls, thereby providing a more accurate segmentation.