The present invention relates to an 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 where it is located outside the field of view of the imaging sensor device and a second operative position where it is located within the field of vie