The role of spontaneous brain activity in perception