We describe a new fully automatic method for the segmentation of brain images that contain multiple sclerosis white matter lesions. Multichannel magnetic resonance images are used to delineate multiple sclerosis lesions while segmenting the brain into its major structures. The method is an atlas-based segmentation technique employing a topological atlas as well as a statistical atlas. An advantage of this approach is that all segmented structures are topologically constrained, thereby allowing subsequent processing such as cortical unfolding or diffeomorphic shape analysis techniques. Evaluation with both simulated and real data sets demonstrates that the method has an accuracy competitive with state-of-the-art MS lesion segmentation methods, while simultaneously segmenting the whole brain.