A method includes receiving multiple measurements, acquired using a registration tool including an ultrasound (US) transducer and a position sensor of a position-tracking system. The measurements are acquired by attaching the tool to multiple locations on a patient head and acquiring position measurements of the position sensor and respective US measurements of bone tissue at the locations. First positions of the bone tissue are calculated based on the position measurement and the US measurements obtained using the registration tool. Second positions of the bone tissue are identified in an anatomical image of the patient head. The anatomical image is registered with a coordinate system of the position tracking system, by correlating the first positions and the second positions, to enable tracking a medical instrument, which is inserted into the patient head and includes another position sensor of the position-tracking system, using the anatomical image registered with the position-tracking system.