Apparatus for acquiring data relative to a dimension of an elongated object defining a longitudinal axis and a first and a second end , the apparatus comprising: - an imaging sensor device defining a field of view and an optical axis , the imaging sensor device being adapted to image the elongated object in the field of view; - a transporting device adapted to position the elongated object in the field of view and to transport the elongated object in a transport direction substantially parallel to the longitudinal axis of the elongated object and forming an angle with the optical axis ; - an illuminating device adapted to emit electromagnetic radiation to illuminate the elongated object in the field of view ; and - an optical deflection system including an optical deflector which is adapted to be movable between a first operative position and a second operative position and which is adapted, in the second operative position, to deflect electromagnetic radiation travelling parallel to the longitudinal axis towards said imaging sensor device so as to obtain an image of the first or of the second end of the elongated object ; - wherein the optical deflection system includes an optical deflector holder adapted to rotate the optical deflector so that the second operative position comprises a first sub-position in which electromagnetic radiation travelling parallel to the longitudinal axis in a first versus is deflected towards said imaging sensor device so as to obtain an image of the first end of the elongated object and a second sub-position in which electromagnetic radiation travelling parallel to the longitudinal axis in a second versus is deflected towards said imaging sensor device so as to obtain an image of the second end of the elongated object . - an imaging sensor device defining a field of view and an optical axis , the imaging sensor device being adapted to image the elongated object in the field of view; - a transporting device adapted to position the elongated object in the field of view and to transport the elongated object in a transport direction substantially parallel to the longitudinal axis of the elongated object and forming an angle with the optical axis ; - an illuminating device adapted to emit electromagnetic radiation to illuminate the elongated object in the field of view ; and - an optical deflection system including an optical deflector which is adapted to be movable between a first operative position and a second operative position and which is adapted, in the second operative position, to deflect electromagnetic radiation travelling parallel to the longitudinal axis towards said imaging sensor device so as to obtain an image of the first or of the second end of the elongated object ; - wherein the optical deflection system includes an optical deflector holder adapted to rotate the optical deflector so that the second operative position comprises a first sub-position in which electromagnetic radiation travelling parallel to the longitudinal axis in a first versus is deflected towards said imaging sensor device so as to obtain an image of the first end of the elongated object and a second sub-position in which electromagnetic radiation travelling parallel to the longitudinal axis in a second versus is deflected towards said imaging sensor device so as to obtain an image of the second end of the elongated object . <EOS>