Multiple electrode contacts make electrical connections to the anterior and/orposterior chest for multivariatecharacterization of the electrical activation of the heart. A centralprocessing unit derives synthetic compositeelectrographic signals as well as flag signals for specific purposes. Apreferred embodiment uses this system to triggeror gate magnetic resonance imaging, eliminating or reducing problems fromsmall or inverted R-waves, leaddetachment, noise, flow signal, gradient changes, and rhythm changes, morereliably flagging the onset of electricalactivation of the ventricles. Additional derived data are ST-segment shifts,filling times, and respiratory cycle. Fillingtimes may be used for greatly improved imaging in the presence of rhythmdisturbances, such as atrial fibrillation.Respiratory cycle may be used as a respiratory trigger to control for theeffects of breathing on the heart position andimage quality.