T1 magnetic resonance imaging head segmentation for diffuse optical tomography and electroencephalography