Line profile measurement with a scanning probe microscope