The pineal gland is a small endocrine gland which is located between the two cerebral hemispheres, tucked in a groove where the two rounded thalamic bodies join. It is attached to the roof of the third ventricle near its junction with the mid-brain, developing as an outgrowth from the third ventricle of the brain. The pineal gland secretes melatonin, which is a hormone that affects the modulation of wake/sleep patterns and photoperiodic functions. It is shaped like a tiny pine cone, hence its name.
The pineal gland is about the size of a pea and is reddish-grey. The pineal body consists of a lobular parenchyma of pinealocytes surrounded by connective tissue spaces. The gland's surface is covered by a pial capsule.