I think the thalamus is the gateway to the cerebral cortex. Thalamus is a small structure within the brain located just above the brain stem between the cerebral cortex and the mid brain and has extensive nerve connections to both. Its main function is to relay motor and sensory signals to the cerebral cortex. A sensory impulse travels from the body surface towards the thalamus, which receives it as a sensation, which is then passed onto the cerebral cortex for interpretation as touch, pain or temperature.