The diencephalon is divided into the thalamus, the hypothalamus, and the epithalamus. There are two egg-like thalami in the diencephalon, but only one hypothalamus below them. The pituitary gland (part of the endocrine system as well as the nervous system) is the small pea-like structure that hangs down from the hypothalamus. The epithalamus is mainly made up of the small pinecone-shaped pineal gland, which is located in the center posterior of the diencephalon. Like the pituitary gland, the pineal gland is part of both the endocrine system and the nervous system.
The two thalami serve as a junction and relay system that receives and filters afferent (incoming) sensory information, then relays it on to other parts of the brain, mainly the cerebral cortex, but also to the cerebellum and brainstem.
The hypothalamus regulates body temperature, food intake, and thirst.
The pituitary gland regulates the secretions of other glands in the endocrine system. It receives signals from the hypothalamus to do so.
The pineal gland secretes melatonin which helps regulate sleep patterns.