The disclosure relates to a method of automatically producing a three-dimensional (3D) segmentation of a heart chamber, the method comprising: obtaining data sets from cardiac magnetic resonance imaging (MRI) or ultrasound, generating a 3D segmentation of the heart chamber from the data sets using an active contour method, modifying the 3D segmentation by adding a plurality of intra-chamber structures; and identifying an enclosing myocardium using the 3D segmentation generated by the method.