While a catheter that includes (i) a catheter body, and (ii) a catheter shaft, which includes a sensor and which is disposed inside a lumen of the catheter body, is inside a body of a subject, a coordinate system of the sensor is registered with a coordinate system of an imaging system, using (a) a calibration image, acquired by the imaging system, that shows an indication of a distal end of the catheter body, and (b) a signal from the sensor, but not using any indication of the sensor shown in the calibration image. Using the registering, a visual output is generated. Other embodiments are also described.