A method is presented for the rigid registration of tracked B-mode ultrasound images to a CT volume of a femur and pelvis. This registration can allow tracked surgical instruments to be aligned with the CT image or an associated preoperative plan. Our method is fully automatic and requires no manual segmentation of either the ultrasound images or the CT volume. The parameter which is directly related to the speed of sound through tissue has also been included in the registration optimisation process. Experiments have been carried out on six cadaveric femurs and three cadaveric pelves. Registration results were compared with a "gold standard" registration acquired using bone implanted fiducial markers. Results show the registration method to be accurate, on average, to 1.6 mm root-mean-square target registration error.