An optical shape sensing system comprising: - a guide wire comprising an optical fiber with optical shape sensing properties along at least a part of its longitudinal extension, - an associated longitudinal device arranged to allow a user to attach the guide wire thereto, so as to ensure that the optical fiber will follow a three-dimensional shape of at least a part of the associated longitudinal device, - a longitudinal offset encoding system arranged to establish a recognizable longitudinal offset between the associated longitudinal device and the optical fiber, and - an optical console system O_C, P) arranged for: - recognizing said recognizable longitudinal offset between the associated longitudinal device and the optical fiber, and registering a longitudinal offset of the associated longitudinal device in relation to a point along the optical fiber accordingly, - optically interrogating the optical fiber, - reconstructing a three-dimensional shape of at least a part of the optical fiber in response to a result of said optical interrogation of the optical fiber, and for - generating an output indicative of a three-dimensional shape of at least a part of the associated longitudinal device in response to said reconstructed three-dimensional shape of at least part of the optical fiber, and in response to said registered longitudinal offset of the associated longitudinal device in relation to a point along the optical fiber. - a guide wire comprising an optical fiber with optical shape sensing properties along at least a part of its longitudinal extension, - an associated longitudinal device arranged to allow a user to attach the guide wire thereto, so as to ensure that the optical fiber will follow a three-dimensional shape of at least a part of the associated longitudinal device, - a longitudinal offset encoding system arranged to establish a recognizable longitudinal offset between the associated longitudinal device and the optical fiber, and - an optical console system O_C, P) arranged for: - recognizing said recognizable longitudinal offset between the associated longitudinal device and the optical fiber, and registering a longitudinal offset of the associated longitudinal device in relation to a point along the optical fiber accordingly, - optically interrogating the optical fiber, - reconstructing a three-dimensional shape of at least a part of the optical fiber in response to a result of said optical interrogation of the optical fiber, and for - recognizing said recognizable longitudinal offset between the associated longitudinal device and the optical fiber, and registering a longitudinal offset of the associated longitudinal device in relation to a point along the optical fiber accordingly, - optically interrogating the optical fiber, - reconstructing a three-dimensional shape of at least a part of the optical fiber in response to a result of said optical interrogation of the optical fiber, and for - generating an output indicative of a three-dimensional shape of at least a part of the associated longitudinal device in response to said reconstructed three-dimensional shape of at least part of the optical fiber, and in response to said registered longitudinal offset of the associated longitudinal device in relation to a point along the optical fiber.