All sensations and behaviors are encoded in the dynamic activity patterns of neural networks. In other words, complex networks of many individual neurons respond to environmental features, visual or auditory stimuli, reward or punishment, etc. Neural networks extend over 3D space and, in most cases, cross many cortical layers of the brain. Two-photon microscopy has made it possible for neuroscientists to reach the deep regions of the brain (down to 850 µm) and study them at a high spatiotemporal resolution by using many new scanning methods, and reveal the function of neuronal populations containing hundreds or even up to a few thousand identified cells in 3D.