= T1-MRI Segmentation with SPM12 / CAT12 = ''Authors: Francois Tadel '' '''CAT''' is a [[http://www.neuro.uni-jena.de/cat/|SPM12 toolbox]] that is fully interfaced with Brainstorm. It can replace efficiently FreeSurfer for generating the cortical surface from any T1 MRI. It runs on '''any OS''' in '''about 1 hour''', instead of the typical 24hr FreeSurfer recon-all processing. The surfaces are registered to the templates with the FreeSurfer spheres, and include many anatomical and functional atlases. You can either run the CAT segmentation from Brainstorm, or run it separately and import its outputs as you would do with FreeSurfer. The software is not packaged with Brainstorm and does not work with the compiled version of Brainstorm, you must install SPM12 and CAT separately. <> == Install SPM12 == * Download SPM12: https://www.fil.ion.ucl.ac.uk/spm/software/download/ * Unzip it anywhere on your computer, but '''not''' in any of the Brainstorm folder. * Do not add the spm12 folder to your path if you are not a SPM user, Brainstorm will do this automatically when needed. * Start Brainstorm, set the SPM12 path in the Brainstorm preferences (File > Edit preferences). == Install CAT12 == * Download CAT: http://www.neuro.uni-jena.de/cat/index.html#DOWNLOAD * Unzip the downloaded file. * Move the cat12 folder to the '''spm12/toolbox '''directory == Running CAT from Brainstorm == * Switch to the anatomy side of the database explorer. * Create a subject, import the T1 MRI for this subject. * Set the [[https://neuroimage.usc.edu/brainstorm/Tutorials/ImportAnatomy#Fiducial_points|fiducial points]] manually (NAS/LPA/RPA) or [[https://neuroimage.usc.edu/brainstorm/Tutorials/ImportAnatomy#MNI_transformation|compute the MNI transformation]]. * Right-click on the MRI > '''CAT12 MRI registration''', <
>or use the process '''Import anatomy > Segment MRI with SPM12/CAT12'''<
><
> {{attachment:segmentMenu.gif||width="196",height="251"}} {{attachment:segmentProcess.gif||width="325",height="180"}} * In interactive mode, you will be prompted for the number of vertices you want in the final cortex surface. This will by extension define the number of dipoles to estimate during the source estimation process. By default we set this value to 15000 for the entire brain (it means 7500 for each hemisphere). <
><
> {{attachment:segmentVertices.gif||width="248",height="109"}} * Brainstorm saves the MRI to process in a temporary folder, than calls CAT as an SPM batch:<
>$HOME/.brainstorm/tmp/cat12/spm_cat12.nii * All the output from CAT will be saved in the same temporary folder. At the end, Brainstorm imports the output folder as the anatomy folder for the selected subject. If the process crashes, you can inspect the contents of this folder for indices on how to solve the problem. If the segmentation and the import is successful, the temporary folder is deleted. * A report is displayed by CAT, and saved as an image and a PDF file in tmp/cat12/report. <
><
> {{attachment:catreportj_spm_cat12.jpg||width="600",height="844"}} == Importing the results in Brainstorm == If you run the segmentation process process, the import will be done automatically. Otherwise, if you need to import an existing CAT segmentation, here is the following procedure. * Right-click on the subject > Import anatomy folder. * Select the file format "CAT12 folder". * Enter the desired number of vertices in the final cortex surface. * The files that are imported from the subject_id folder are the following: * /mri/'''T1.mgz''' (T1 MRI volume) * /mri/'''aseg.mgz''' (segmentation of subcortical structures) * /surf/'''?h.pial''' (grey/csf interface) * /surf/'''?h.white '''(grey/white matter interface) * /surf/'''?h.sphere.reg''' (registered parametrized sphere, for subject co-registration) * /label/'''?h.*.annot''' (cortical surface-based atlases) * /surf/'''?h.thickness''' (cortical thickness map) == Citing CAT == If you use CAT from Brainstorm for MRI segmentation, please cite the following article in your publications: ...