Extracting the brain cortex from magnetic resonance imaging (MRI) head scans is an essential preprocessing step of which the accuracy greatly affects subsequent image analysis. The currently popular Brain Extraction Tool (BET) produces a brain mask which may be too smooth for practical use. This paper presents a novel brain extraction tool based on three-dimensional geodesic active contours, connected component analysis and mathematical morphology. Based on user-specified intensity and contrast levels, the proposed algorithm allows an active contour to evolve naturally and extract the brain cortex. Experiments on synthetic MRI data and scanned coronal and axial MRI image volumes indicate successful extraction of tight perimeters surrounding the brain cortex. Quantitative evaluations on both synthetic phantoms and manually labeled data resulted in better accuracy than BET in terms of true and false voxel assignment. Based on these results, we illustrate that our brain extraction tool is a robust and accurate approach for the challenging task of automatically extracting the brain cortex in MRI data.