We present a completely automated 2D-3D registration technique that accurately maps a patient-specific heart model, created from preoperative images, to the patient's orientation in the operating room. This mapping is based on the registration of preoperatively acquired 3D vascular data with intraoperatively acquired angiograms. Registration using both single and dual-plane angiograms is explored using simulated but realistic datasets that were created from clinical images. Heart deformations and cardiac phase mismatches are taken into account in our validation using a digital 4D human heart model. In an ideal situation where the pre- and intraoperative images were acquired at identical time points within the cardiac cycle, the single-plane and the dual-plane registrations resulted in 3D root-mean-square (rms) errors of and , respectively. When a 10% timing offset was added between the pre- and the intraoperative acquisitions, the single-plane registration approach resulted in inaccurate registrations in the out-of-plane axis, whereas the dual-plane registration exhibited a 98% success rate with a 3D rms error of . When all potential sources of error were included, namely, the anatomical background, timing offset, and typical errors in the vascular tree reconstruction, the dual-plane registration performed at 94% with an accuracy of .