A computerized tomography scan of a patient is registered with a magnetictracking system configured to track a sensor in proximity to the patient. Thesensor is mounted on a probe. When the distal end of the probe is in contactwith the patient a vector representing a translation from the sensor to thedistalend is determined and used together with the registered image to determine aposition of the distal end with respect to the patient.