MRI Segmentation with CAT12

Authors: Francois Tadel

CAT.gif CAT is a 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 surface and volume parcellations. You can either install and run the CAT segmentation from Brainstorm, or run it separately and import its outputs as you would do with FreeSurfer.

Cite CAT12

If you use CAT for MRI segmentation, please cite the following article in your publications:

Gaser C, Dahnke R, Kurth F, Luders E
CAT - A Computational Anatomy Toolbox for the Analysis of Structural MRI Data
NeuroImage, in review

Install CAT12

CAT12 requires the prior installation of SPM12. Both are Matlab-based programs that be installed automatically as Brainstorm plugins:

If you want to use your own installation of SPM12/CAT12 instead, refer to the plugins tutorial.

Troubleshooting

On Windows computers, you might run into an error: Error creating link. This is related with the creation of the symbolic link from plugins/spm12/spm12/toolbox/cat12 to plugins/cat12/cat12. This forum post mentions two workarounds:

Run CAT from Brainstorm

Troubleshooting

Importing the results in Brainstorm

If you run the segmentation process from Brainstorm, the import will be done automatically. Otherwise, if you need to import an existing CAT segmentation, here is the following procedure.

Files imported

The files that are imported from the segmentation output folder are the following:

The files you can see in the database explorer at the end:

Cortical parcellations

Using CAT12 from Brainstorm, the following cortical parcellations are available:

These atlases are imported in Brainstorm as scouts (cortical regions of interest), and saved directly in the surface files. To access them from the interface: Display any cortex surface, go to the Scout tab and click on the drop-down list to select another Atlas (ie group of scouts):

scoutTab.gif atlasDestrieux.gif atlasDK.gif

atlasHCP.gif atlasSchaefer7.gif atlasSchaefer17.gif

Cortical thickness

The cortical thickness can be saved as a cortical map in the database (a "results" file). This result is generated when using the file format "CAT12 folder + Thickness maps" in the Import anatomy folder selection.

thicknessFile.gif

Registered spheres

The registered spheres are saved in each surface file in the field Reg.Sphere.Vertices. There is nothing that can be done with this information at this point, but it will become helpful when projecting the source results from the individual brains to the default anatomy of the protocol, for a group analysis of the results: Subject coregistration.

Read more about the FreeSurfer registration process on the software wiki:
https://surfer.nmr.mgh.harvard.edu/fswiki/SurfaceRegAndTemplates

Volume parcellations

Many volume parcellations are available when this option is selected when running CAT:

volatlas.gif

Tissue classification

The tissue probability maps saved in /mri/p*.nii are grouped to create one volume with the labels of 5 tissues: gray matter, white matter, CSF, skull, scalp.

voltissues.gif

SPM batch

The CAT segmentation is executed with the following SPM12 batch:

matlabbatch{1}.spm.tools.cat.estwrite.data = {[NiiFile ',1']};
matlabbatch{1}.spm.tools.cat.estwrite.data_wmh = {''};
matlabbatch{1}.spm.tools.cat.estwrite.useprior = '';
matlabbatch{1}.spm.tools.cat.estwrite.nproc = 0;                % Blocking call to CAT12
matlabbatch{1}.spm.tools.cat.estwrite.opts.tpm = {TpmNii};      % User-defined TPM atlas
matlabbatch{1}.spm.tools.cat.estwrite.output.bias.warped = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.GM.native   = 1;   % GM tissue maps
matlabbatch{1}.spm.tools.cat.estwrite.output.GM.warped   = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.GM.mod      = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.GM.dartel   = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.WM.native   = 1; % WM tissue maps
matlabbatch{1}.spm.tools.cat.estwrite.output.WM.warped   = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.WM.mod      = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.WM.dartel   = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.TPMC.native = 1; % Tissue classes 4-6
matlabbatch{1}.spm.tools.cat.estwrite.output.TPMC.warped = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.TPMC.mod    = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.TPMC.dartel = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.CSF.native  = 1; % CSF tissue maps
matlabbatch{1}.spm.tools.cat.estwrite.output.CSF.warped  = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.CSF.mod     = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.CSF.dartel  = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.label.native = 1; % CSF=1,GM=2,WM=3,WMH=4
matlabbatch{1}.spm.tools.cat.estwrite.output.label.warped = 0;
matlabbatch{1}.spm.tools.cat.estwrite.output.label.dartel = 0;

% Volume atlases
if isVolumeAtlases
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.neuromorphometrics = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.lpba40             = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.cobra              = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.aal3               = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.anatomy3           = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.ibsr               = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.julichbrain        = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.hammers            = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.mori               = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.Schaefer2018_100Parcels_17Networks_order = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.Schaefer2018_200Parcels_17Networks_order = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.Schaefer2018_400Parcels_17Networks_order = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.Schaefer2018_800Parcels_17Networks_order = 1;
  matlabbatch{1}.spm.tools.cat.estwrite.output.atlas.native = 1;  % Save in native space
else
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.noROI = struct([]);
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.neuromorphometrics = 0;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.lpba40             = 0;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.cobra              = 0;
  matlabbatch{1}.spm.tools.cat.estwrite.output.ROImenu.atlases.hammers            = 0;
end

% Extract additional surface parameters: Cortical thickness, Gyrification index, Sulcal depth
if isExtraMaps
  % Separate SPM process (second element in the batch)
  matlabbatch{2}.spm.tools.cat.stools.surfextract.data_surf(1) = cfg_dep('CAT12: Segmentation (current release): Left Central Surface', substruct('.','val', '{}',{1}, '.','val', '{}',{1}, '.','val', '{}',{1}, '.','val', '{}',{1}), substruct('()',{1}, '.','lhcentral', '()',{':'}));
  matlabbatch{2}.spm.tools.cat.stools.surfextract.GI = 1;     % Gyrification index
  matlabbatch{2}.spm.tools.cat.stools.surfextract.SD = 1;     % Sulcal depth
  matlabbatch{2}.spm.tools.cat.stools.surfextract.nproc = 0;  % Blocking call to CAT12
end
% Run SPM batch
spm_jobman('initcfg');
spm_jobman('run',matlabbatch);

Additional documentation

Tutorials/SegCAT12 (last edited 2023-04-03 09:23:46 by FrancoisTadel)