Electrocardiogram (ECG). Takes images of the heart, shows the pumping action, evaluates the function of the heart valves, and detects anatomic abnormalities.It records the electrical activity of the heart and provides information about the heart’s rhythm, anatomy, and function.