The atrophy of white matter (WM) and gray matter (GM) in multiple sclerosis (MS) could be associated with the progression of MS. Our aim of this study was to develop an automated method for segmentation of WM and GM regions. Our method for segmentation of WM regions was based on a level set method and filling in holes with MS regions detected by our computer-aided detection (CAD) system. As a result, the degree of coincidence between regions obtained by our method and neuroradiologists was 91% on average for whole brain regions, 75% for WM regions, and 71% for GM regions.