How is ECG gating performed?

How is ECG gating performed?

Three or four ECG leads are placed over the patient's left chest in a configuration that optimizes the signal of the R wave.
Triggering is such that the R wave initiates the MR pulse sequence.