A system for the registration of computed tomography and 3-D intraoperative ultrasound images is presented. Three gradient-based methods and one evolutionary algorithm are compared with regard to their suitability to solve this image registration problem. The system has been developed for pedicle screw insertion during spinal surgery. With clinical preoperative and intraoperative data, it is demonstrated that precise registration is possible within a realistic range of initial misalignment. Significant differences can be observed between the optimization methods. The covariance matrix adaptation evolution strategy shows the best overall performance, only four of 12 000 registration trials with patient data failed to register correctly.