A medical instrument system comprises an elongate instrument body; an optical fiber (12) coupled in a constrained manner to the elongate instrument body, the optical fiber (12) including one or more Bragg gratings; a detector (15) operably coupled to a proximal end of the optical fiber and configured to detect respective light signals reflected by the one or more Bragg gratings; and a controller operatively coupled to the detector (15), wherein the controller is configured to determine a geometric configuration of at least a portion of the elongate instrument body based on a spectral analysis of the detected reflected portions of the light signals.