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