Visual and quantitative control for the performance of spirometry