FreeSurfer is an open source software suite for extracting the cortex from an MRI, and more.
Download Freesurfer here.
Register for a license key here.
Follow the installation instructions. Create a license.txt file, copy the key into it and save in the freesurfer folder.
Sourcing FreeSurfer Mac from terminal:
$> export FREESURFER_HOME=/Applications/freesurfer $> source $FREESURFER_HOME/SetUpFreeSurfer.sh
Navigate to your DICOM folder in terminal.
Run the recon-all command
recon-all -i file.dcm -subject NAME -all
Where file.dcm should be one of the DICOM files in your folder (e.g. 00000001.dcm or just 00000001). Freesurfer will automatically get the rest of the images in the series.
After the -subject argument NAME should be the name you want to call the study/subject. There will be a folder created with this name in the Applications/FreeSurfer/Subjects folder.
The process can take 10-20 hours, for me, it took ~10hrs on my 2011 core i5 Macbook Pro.
Once it is done you can proceed to import your Freesurfer anatomy into Brainstorm. See the tutorial here.