Electronic structure of atomically resolved carbon nanotubes