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