The electrocardiogram (ECG) is one of the most significant outputs of a computational model of cardiac electrophysiology because it relates the numerical results to clinical data and is a universal tool for diagnosing heart diseases. One key features of the ECG is the T-wave, which is caused by longitudinal and transmural heterogeneity of the action potential duration (APD). Thus, in order to model a correct wave of repolarization, different cell properties resulting in different APDs must be assigned across the ventricular wall and longitudinally from apex to base. To achieve this requirement, a regional parametrization of the heart is necessary. We propose a robust approach to obtain the transmural and longitudinal segmentation in a general heart geometry without relying on ad hoc procedures. Our approach is based on auxiliary harmonic lifting analyses, already used in the literature to generate myocardial fiber orientations. Specifically, the solution of a sequence of Laplace boundary value problems allows parametrically controlled segmentation of both heart ventricles. The flexibility and simplicity of the proposed method is demonstrated through several representative examples, varying the locations and extents of the epicardial, midwall, and endocardial layers. Effects of the control parameters on the T-wave morphology are illustrated via computed ECGs.