Inline system for measurements of diameter