A parametric model representing a portion of a heart is constructed using astatistical priorof the shape from a dataset of other instances of the portion. Using a mappingelectrode, electricaldata is acquired in a plurality of locations in the portion of the heart of asubject. The parametricmodel is fitted to the electrical data and the statistical prior to produce anisosurface of theportion of the heart and a reconstruction of its shape.