CAT12 Missing Files

I tried to run a CAT12 MRI segmentation on a nifti file that I had imported into Brainstorm and after about 20-30 minutes of running CAT12 there was an error messages stating two surface files were not found "lh.central and rh.central". I got this message even after updating to the latest version of CAT12. Anyone have any ideas on what is happening?

Does the MRI need to be a "T1.mgz" file in order to work with CAT12?

Pasting the full error message just in case:

  372 - cat_main_gintnorm1639
  109 - cat_main1639
  907 - cat_run_job1639
   34 - cat_run_newcatch
  865 - run_job
  455 - cat_run
   29 - cfg_run_cm
 1717 - local_runcj
  972 - cfg_util
  469 - fill_run_job
  247 - spm_jobman
  318 - Compute
  371 - ComputeInteractive
   28 - process_segment_cat12
   28 - bst_call
  609 - @(h,ev)bst_call(@process_segment_cat12,'ComputeInteractive',iSubject,[])
------------------------------------------------------------------------

Print 'Graphics' figure to: 
  C:\Users\rawan\.brainstorm\tmp\cat12\report\catreport_E-0318.pdf
  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\mri\p1E-0318.nii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\mri\p2E-0318.nii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\mri\p3E-0318.nii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\mri\p4E-0318.nii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\mri\p5E-0318.nii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\mri\p6E-0318.nii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\mri\p0E-0318.nii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\label\catROIs_E-0318.xml" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\surf\lh.central.E-0318.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\surf\lh.sphere.E-0318.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\surf\lh.sphere.reg.E-0318.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\surf\lh.thickness.E-0318" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\surf\lh.pbt.E-0318" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\surf\rh.central.E-0318.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\surf\rh.sphere.E-0318.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\surf\rh.sphere.reg.E-0318.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\surf\rh.thickness.E-0318" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\rawan\.brainstorm\tmp\cat12\surf\rh.pbt.E-0318" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

09-Nov-2020 14:38:34 - Done    'CAT12: Segmentation (current release)'
09-Nov-2020 14:38:34 - Done


***************************************************************************
** Error: Could not import CAT12 folder: 
** Surface file was not found: lh.central
** Surface file was not found: rh.central
**

I am trying to run CAT12 segmentation on the ICBM152 template (which I did last week and it worked fine) and I too am running into the same error.

Regarding all your missing files: make sure you do not start another instance of Brainstorm while you run CAT. Starting Brainstorm empties the temporary folder $HOME/.brainstorm/tmp, which includes the temporary folder for cat12, causing the process to fail.

I updated the CAT segmentation and import in Brainstorm, it may help as well:

I did the following:

  • Created a new subject (default anatomy: NO, default channel file: NO)
  • Right-click on subject folder > Use template > ICBM152
  • Delete all the surfaces, keep only the MRI
  • Execute the script below:
% Process: Segment MRI with CAT12
sFiles = bst_process('CallProcess', 'process_segment_cat12', [], [], ...
    'subjectname', 'CAT12_ICBM152', ...
    'nvertices',   15000, ...
    'tpmnii',      {'', 'Nifti1'}, ...
    'sphreg',      1, ...
    'extramaps',   1);

Here is the output of CAT in the Matlab command window:
(@CGaser: see the errors about catROI_CAT12_ICBM152.xml)

SPM12: spm_cat12 (vCAT12.7)                        19:45:38 - 10/11/2020
========================================================================

   _______  ___  _______    
  |  ____/ / _ \ \_   _/   Expert Mode
  | |___  / /_\ \  | |     Computational Anatomy Toolbox
  |____/ /_/   \_\ |_|     CAT12.7 - http://www.neuro.uni-jena.de

 CAT default file:
	C:\Work\Dev\Divers\spm12\toolbox\cat12\cat_defaults.m



------------------------------------------------------------------------
10-Nov-2020 19:45:46 - Running job #1
------------------------------------------------------------------------
10-Nov-2020 19:45:46 - Running 'CAT12: Segmentation (current release)'
External diary log is writen to "of".
Your version of CAT12 is up to date.

------------------------------------------------------------------------
CAT12.7 r1728: 1/1:      .\franc\.brainstorm\tmp\cat12\CAT12_ICBM152.nii
------------------------------------------------------------------------
SANLM denoising (medium):                                            33s
APP: Rough bias correction:                                       
  Initialize                                                          5s
  Estimate background                                                 4s
  Initial correction                                                  7s
  Refine background                                                   4s
  Final correction                                                    7s
  Final scaling                                                       9s
                                                                     41s
Affine registration                                                   4s
Affine registration                                                   7s
SPM preprocessing 1 (estimate 1):                                 
Final fine affine registration failed.
Use fine affine registration from previous step.
  102s
SPM preprocessing 1 (estimate 2):                                    91s
SPM preprocessing 2 (write):                                      
  Write Segmentation                                                 20s
  Update Segmentation                                                28s
  Update Skull-Stripping                                             31s
  Update probability maps                                             6s
                                                                     84s
Global intensity correction:                                         13s
SANLM denoising after intensity normalization (medium):              11s
Fast registration                                                    37s
Local adaptive segmentation (LASstr=0.50):                        
  Prepare maps                                                        5s
  Prepare partitions                                                  1s
  Prepare segments (LASmod = 1.00)                                   13s
  Estimate local tissue thresholds (WM)                              15s
  Estimate local tissue thresholds (GM)                              22s
  Estimate local tissue thresholds (CSF/BG)                           3s
  Intensity transformation                                           62s
  SANLM denoising after LAS (medium)                                 21s
                                                                     21s
ROI segmentation (partitioning):                                  
  Atlas -> subject space                                              9s
  Major structures                                                    6s
  Ventricle detection                                                15s
  Blood vessel detection                                             10s
  WMH detection (WMHCstr=0.50 > WMHCstr'=0.01)                       31s
  Manual stroke lesion detection                                      0s
  Closing of deep structures                                          2s
  Side alignment                                                      5s
  Final corrections                                                   2s
                                                                     81s
Blood vessel correction (BVCstr=0.50):                                1s
Amap using initial SPM12 segmentations (MRF filter strength 0.07):   40s
    AMAP peaks: [CSF,GM,WM] = [0.40±0.07,0.69±0.09,0.97±0.04]
Final cleanup (gcutstr=0.25):                                     
  Level 1 cleanup (ROI estimation)                                    4s
  Level 1 cleanup (brain masking)                                     1s
  Level 2 cleanup (CSF correction)                                    1s
  Level 3 cleanup (CSF/WM PVE)                                        1s
                                                                      8s
Optimized Shooting registration with 2.50:-0.25:1.50 mm (regstr=0.50):
  Template: "C:\Work\Dev\Divers\spm12\toolbox\cat12\templates_volumes\Template_0_IXI555_MNI152_GS.nii"
    1 | 2.50 | 0.0546  0.0000  0.0546
    2 | 2.50 | 0.0547  0.0002  0.0548
    3 | 2.50 | 0.0546  0.0002  0.0549
   16 | 2.25 | 0.0462  0.0002  0.0464
   17 | 2.25 | 0.0455  0.0007  0.0462
   30 | 2.00 | 0.0439  0.0009  0.0448
   31 | 2.00 | 0.0420  0.0013  0.0432
   44 | 1.75 | 0.0404  0.0015  0.0419
   45 | 1.75 | 0.0390  0.0018  0.0409
   58 | 1.50 | 0.0367  0.0020  0.0387
   59 | 1.50 | 0.0352  0.0024  0.0376
Shooting registration with 2.50:-0.25:1.50 mm takes:                117s
  Prepare output                                                     18s
                                                                    135s
  Jacobian determinant (RMS): 0.005 0.026 0.043 0.056 0.067 |  0.069682 
           Template Matching: 0.164 0.137 0.126 0.117 0.106 |  0.105606 
Write result maps:                                                   14s
Surface and thickness estimation:                                 
lh:
  Thickness estimation (0.50 mm³):                                
    WM distance:                                                     47s
    CSF distance:                                                    22s
    PBT2x thickness:                                                 14s
                                                                     96s
  Create initial surface                                             49s
  Topology correction and surface refinement:                       108s
  Correction of central surface in highly folded areas               19s
  Refine central surface                                            129s
  Correction of central surface in highly folded areas 2             15s
  Spherical mapping with areal smoothing                            148s
  Spherical registration                                            338s
    Euler number / defect number / defect size: -50 / 25 / 1.29% 

rh:
  Thickness estimation (0.50 mm³):                                
    WM distance:                                                     51s
    CSF distance:                                                    22s
    PBT2x thickness:                                                 14s
                                                                    100s
  Create initial surface                                             50s
  Topology correction and surface refinement:                       113s
  Correction of central surface in highly folded areas               12s
  Refine central surface                                            126s
  Correction of central surface in highly folded areas 2             15s
  Spherical mapping with areal smoothing                            148s
  Spherical registration                                            333s
    Euler number / defect number / defect size: -62 / 28 / 1.59% 

cb:
  Thickness estimation (0.50 mm³):                                
    WM distance:                                                     11s
    CSF distance:                                                     7s
    PBT2x thickness:                                                  5s
                                                                     26s
  Create initial surface                                             13s
  Topology correction and surface refinement:                        41s
  Correction of central surface in highly folded areas               46s
  Refine central surface                                            338s
  Correction of central surface in highly folded areas 2             27s
  Spherical mapping with areal smoothing                            284s
  Spherical registration                                            425s
    Euler number / defect number / defect size: -426 / 52 / 8.84% 

Final cerebral surface processing results: 
  Average thickness:                     3.3823 ± 1.0296 mm
  Surface intensity / position RMSE:     0.0670 / 0.0926
  Euler number / defect number / defect size: 183.3 / 35.0 / 3.90% 
  Display thickness: C:\Users\franc\.brainstorm\tmp\cat12\surf\lh.thickness.CAT12_ICBM152
  Display thickness: C:\Users\franc\.brainstorm\tmp\cat12\surf\rh.thickness.CAT12_ICBM152
  Display thickness: C:\Users\franc\.brainstorm\tmp\cat12\surf\cb.thickness.CAT12_ICBM152
  Surface ROI estimation:                                         Surface and thickness estimation takes:                            3119s
ROI estimation in native space:                                   
    0s
Quality check:                                                        6s
Developer display mode!
Print 'Graphics' figure to: 
  C:\Users\franc\.brainstorm\tmp\cat12\report\catreport_CAT12_ICBM152.pdf

------------------------------------------------------------------------
CAT preprocessing takes 66 minute(s) and 12 second(s).
Image Quality Rating (IQR):  86.18% (B)
Segmentations are saved in C:\Users\franc\.brainstorm\tmp\cat12\mri
Reports are saved in C:\Users\franc\.brainstorm\tmp\cat12\report
Labels are saved in C:\Users\franc\.brainstorm\tmp\cat12\label
------------------------------------------------------------------------

  Remove "C:\Users\franc\.brainstorm\tmp\cat12\label\catROI_CAT12_ICBM152.xml" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\franc\.brainstorm\tmp\cat12\report\catlog_CAT12_ICBM152.txt" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

10-Nov-2020 20:52:02 - Done    'CAT12: Segmentation (current release)'
10-Nov-2020 20:52:02 - Running 'Extract additional surface parameters'

     1/1) Extract parameters for C:\Users\franc\.brainstorm\tmp\cat12\surf\lh.central.CAT12_ICBM152.gii
             3s - Display C:\Users\franc\.brainstorm\tmp\cat12\surf\lh.gyrification.CAT12_ICBM152
            22s - Display C:\Users\franc\.brainstorm\tmp\cat12\surf\lh.depth.CAT12_ICBM152
             3s - Display C:\Users\franc\.brainstorm\tmp\cat12\surf\rh.gyrification.CAT12_ICBM152
            23s - Display C:\Users\franc\.brainstorm\tmp\cat12\surf\rh.depth.CAT12_ICBM152
10-Nov-2020 20:52:53 - Done    'Extract additional surface parameters'
10-Nov-2020 20:52:53 - Done

If you look in the folder $HOME/.brainstorm/tmp/cat12 after the process is done, you will find the output of CAT. Make a copy of this folder if you think you might need to re-import the subject later.
This includes the quality control reports, in the report subfolder:

In Brainstorm, the surfaces, atlases and surface measures are imported correctly:
image image

image

image image

PS: There are some bugs that are currently discussed with @CGaser and documented on GitHub:
Bugs CAT12 v1728

Thank you for your response. How would the script change if I wanted to use my own MRI (nifti file) instead of the ICBM152 template? Do I need to run it through FreeSurfer in order to get a T1.mgz file before running CAT12?

In Brainstorm:

  1. Create a new subject (Default anatomy: NO, Default channel file: NO)
  2. Right-click on the subject > Import MRI (from any file format, no need to run FreeSurfer before, any .nii or event DICOM would work)
  3. Right-click on the MRI > CAT12 MRI segmentation

You can reproduce the same thing using Brainstorm scripts generated from the Pipeline Editor (with the Process1 box empty):

  1. Import > Import anatomy > Import MRI
  2. Import > Import anatomy > Segment MRI with CAT12

https://neuroimage.usc.edu/brainstorm/Tutorials/PipelineEditor#Saving_a_pipeline
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting

Hello François,
I post my question here because I have similar errors. It has been several weeks now that I am trying to segment my own MRIs with CAT12 on Brainstorm as you suggested :

  1. Create a new subject (Default anatomy: NO, Default channel file: NO)
  2. Right-click on the subject > Import MRI (from any file format, no need to run FreeSurfer before, any .nii or event DICOM would work)
  3. Right-click on the MRI > CAT12 MRI segmentation

But I always get the same issue, the error message you can see below. I tried to run CAT12 independently and I had another error when I tried to segment MRI. I think this may be a CAT12 issue and I was wondering if you have any idea how to resolve it?

Thank you in advance for your reply!

To help you identify the problem, I am posting everything that appeared in the MATLAB command window including the error below:

SPM12: spm_cat12 (vCAT12.9)                        10:23:18 - 08/04/2024
========================================================================

   _______  ___  _______    
  |  ____/ / _ \ \_   _/   
  | |___  / /_\ \  | |     Computational Anatomy Toolbox
  |____/ /_/   \_\ |_|     CAT12.9 - https://neuro-jena.github.io

 CAT default file:
	C:\Users\T4-Admin\.brainstorm\plugins\cat12\cat12\cat_defaults.m

Item 'Tensor Calculation', field 'prog': Value must be a function or function handle on MATLAB path.
Item 'Probabilistic Tracking', field 'prog': Value must be a function or function handle on MATLAB path.
Item 'Mori Streamline Tracking', field 'prog': Value must be a function or function handle on MATLAB path.
Item atlas: No field(s) named
warped
dartel


------------------------------------------------------------------------
08-Apr-2024 10:23:25 - Running job #1
------------------------------------------------------------------------
08-Apr-2024 10:23:25 - Running 'CAT12: Segmentation'

------------------------------------------------------------------------
CAT12.9 r2560: 1/1:       .\.brainstorm\tmp\cat12_240408_102313\P04-PE.n
------------------------------------------------------------------------
SANLM denoising (medium)                                          Your version of CAT12 is up-to-date.
   29s
Affine preprocessing (APP)                                        
  Initialize                                                          7s
  Estimate background                                                 3s
  Initial correction                                                  8s
  Refine background                                                   3s
  Final correction                                                    5s
  Final scaling                                                       4s
                                                                     34s
Correct center-of-mass                                                3s
Affine registration                                                   7s
SPM preprocessing 1 (estimate 1 - TPM registration):                 54s
SPM preprocessing 1 (estimate 2):                                   110s
SPM preprocessing 2 (write)                                       
  Write Segmentation                                                 22s
  Update Segmentation                                                14s
  Update Skull-Stripping                                             18s
  Update probability maps                                             3s
                                                                     57s
Global intensity correction                                           7s
SANLM denoising after intensity normalization (medium)                3s
Fast Optimized Shooting registration                                  2s
   39s
Local adaptive segmentation (LASstr=0.50)                         
  Prepare maps                                                        3s
  Prepare partitions                                                  2s
  Prepare segments (LASmod = 1.00)                                    6s
  Estimate local tissue thresholds (WM)                              16s
  Estimate local tissue thresholds (GM)                              21s
  Intensity transformation                                            0s
  SANLM denoising after LAS (medium)                                 21s
                                                                     71s
ROI segmentation (partitioning)                                   
  Atlas -> subject space                                              8s
  Major structures                                                    9s
  Ventricle detection                                                 4s
  Blood vessel detection                                              5s
  WMH detection (WMHCstr=0.50 > WMHCstr'=0.00)                       19s
  Manual stroke lesion detection                                      0s
  Closing of deep structures                                          1s
  Side alignment                                                      2s
  Final corrections                                                   1s
                                                                     50s
Apply enhanced blood vessel correction                                1s
Amap using initial SPM12 segmentations (MRF filter strength 0.05)   101s
    AMAP peaks: [CSF,GM,WM] = [0.36±0.06,0.68±0.07,0.98±0.05]
Final cleanup (gcutstr=0.25)                                      
  Level 1 cleanup (ROI estimation)                                    2s
  Level 1 cleanup (brain masking)                                     1s
  Level 2 cleanup (CSF correction)                                    1s
  Level 3 cleanup (CSF/WM PVE)                                        1s
                                                                      5s
    2s
Write result maps                                                    21s
Surface and thickness estimation                                  
lh:
  Thickness estimation (0.50 mm³)                                    46s
  Create initial surface                                             22sWarning: [GIFTI] Parsing of XML file C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\surf\lh.layer4x.P04-PE.gii failed. 
> In read_gifti_file (line 17)
In gifti (line 108)
In cat_surf_fun>cat_surf_evalCS (line 1295)
In cat_surf_fun (line 200)
In cat_surf_createCS2 (line 1008)
In cat_main1639 (line 812)
In cat_run_job1639 (line 1296)
In cat_run_newcatch (line 40)
In cat_run>run_job (line 1271)
In cat_run (line 757)
In cfg_run_cm (line 29)
In cfg_util>local_runcj (line 1717)
In cfg_util (line 972)
In spm_jobman>fill_run_job (line 469)
In spm_jobman (line 247)
In process_segment_cat12>Compute (line 356)
In process_segment_cat12>ComputeInteractive (line 440)
In process_segment_cat12 (line 28)
In bst_call (line 28)
In tree_callbacks>@(h,ev)bst_call(@process_segment_cat12,'ComputeInteractive',iSubject,iAnatomy) (line 3110) 

  Topology correction:                                            Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. 
> In cat_io_cprintf (line 335)
In cat_run_newcatch (line 57)
In cat_run>run_job (line 1271)
In cat_run (line 757)
In cfg_run_cm (line 29)
In cfg_util>local_runcj (line 1717)
In cfg_util (line 972)
In spm_jobman>fill_run_job (line 469)
In spm_jobman (line 247)
In process_segment_cat12>Compute (line 356)
In process_segment_cat12>ComputeInteractive (line 440)
In process_segment_cat12 (line 28)
In bst_call (line 28)
In tree_callbacks>@(h,ev)bst_call(@process_segment_cat12,'ComputeInteractive',iSubject,iAnatomy) (line 3110) 

------------------------------------------------------------------------
CAT Preprocessing error for P04-PE:
------------------------------------------------------------------------
Surface file C:Warning: Escaped character '\%' is not valid. See 'doc sprintf' for supported special characters. 
> In cat_run_newcatch (line 175)
In cat_run>run_job (line 1271)
In cat_run (line 757)
In cfg_run_cm (line 29)
In cfg_util>local_runcj (line 1717)
In cfg_util (line 972)
In spm_jobman>fill_run_job (line 469)
In spm_jobman (line 247)
In process_segment_cat12>Compute (line 356)
In process_segment_cat12>ComputeInteractive (line 440)
In process_segment_cat12 (line 28)
In bst_call (line 28)
In tree_callbacks>@(h,ev)bst_call(@process_segment_cat12,'ComputeInteractive',iSubject,iAnatomy) (line 3110) 
 1809 - loadSurf
 1072 - cat_surf_createCS2
  812 - cat_main1639
 1296 - cat_run_job1639
   40 - cat_run_newcatch
 1271 - run_job
  757 - cat_run
   29 - cfg_run_cm
 1717 - local_runcj
  972 - cfg_util
  469 - fill_run_job
  247 - spm_jobman
  356 - Compute
  440 - ComputeInteractive
   28 - process_segment_cat12
   28 - bst_call
 3110 - @(h,ev)bst_call(@process_segment_cat12,'ComputeInteractive',iSubject,iAnatomy)
------------------------------------------------------------------------

     Error:cat_io_report:print: Error printing CAT error report.
Warning: MATLAB was unable to resolve the URL and open it in the browser:

MATLAB:nonLogicalConditional 
> In web>displayWarningMessage (line 172)
In web (line 114)
In cat_io_senderrormail (line 49)
In cat_run_newcatch (line 223)
In cat_run>run_job (line 1271)
In cat_run (line 757)
In cfg_run_cm (line 29)
In cfg_util>local_runcj (line 1717)
In cfg_util (line 972)
In spm_jobman>fill_run_job (line 469)
In spm_jobman (line 247)
In process_segment_cat12>Compute (line 356)
In process_segment_cat12>ComputeInteractive (line 440)
In process_segment_cat12 (line 28)
In bst_call (line 28)
In tree_callbacks>@(h,ev)bst_call(@process_segment_cat12,'ComputeInteractive',iSubject,iAnatomy) (line 3110) 


Please send mail to vbmweb@gmail.com and copy content of C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\report\cat_P04-PE.xml and C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\report\catlog_P04-PE.txt into mail if not already done or attach these files.
  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\label\catROI_P04-PE.xml" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\report\catreport_P04-PE.pdf" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\report\catreportj_P04-PE.jpg" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\surf\lh.central.P04-PE.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\surf\lh.sphere.P04-PE.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\surf\lh.sphere.reg.P04-PE.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\surf\lh.thickness.P04-PE" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\surf\rh.central.P04-PE.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\surf\rh.sphere.P04-PE.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\surf\rh.sphere.reg.P04-PE.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\surf\rh.thickness.P04-PE" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240408_102313\surf\rh.pbt.P04-PE" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

08-Apr-2024 10:37:30 - Done    'CAT12: Segmentation'
Item 'Central Surfaces', field 'val': Number of matching files (0) less than required (1).
08-Apr-2024 10:37:30 - Failed to update inputs for 'Extract additional surface parameters'
Error using harvest
Dependencies resolved, but not suitable for this item.
In item Central Surfaces:
Dependency 1: CAT12: Segmentation (current release): Left Central Surface (out(1).lhcentral(:))


In file "harvest.m" (v5678), function "harvest" at line 47.

No executable modules, but still unresolved dependencies or incomplete module inputs.
The following modules did not run:
Skipped: Extract additional surface parameters


***************************************************************************
** Error: Line 0:  MATLABbatch system
** Job execution failed. The full log of this run can be found in MATLAB command window, starting with the lines (look for the line showing the exact #job as displayed in this error message)
** ------------------ 
** Running job #1
** ------------------
** 
** 
** Call stack:
** >.m>MATLABbatch system at 0
** 
***************************************************************************

@Anaelle, could you verify that the SPM12 plugin is also up to date?

Hello Raymundo, I just checked and I think SPM12 is indeed up to date (version 7771, 13-Jan-2020)

@Anaelle, could you run CAT12 on the MRI from the Default anatomy? Follow these steps:

  • Create a new subject (default anatomy: NO, default channel file: NO)
  • Right-click on subject folder > Use template > ICBM152
  • Delete all the surfaces, keep only the MRI
  • Right-click on MRI file > MRI segmentation > CAT12
  • Use the same settings in CAT12 as you are doing with your MRI file

Hello Raymundo, I've just completed it and I obtained the same error (see below)

CAT12.9 r2560: 1/1:   .\.brainstorm\tmp\cat12_240417_113226\Test_Forum.n
------------------------------------------------------------------------
SANLM denoising (medium)                                          Your version of CAT12 is up-to-date.
   14s
Affine preprocessing (APP)                                        
  Initialize                                                          3s
  Estimate background                                                 1s
  Initial correction                                                  3s
  Refine background                                                   1s
  Final correction                                                    2s
  Final scaling                                                       3s
                                                                     16s
Correct center-of-mass                                                2s
Affine registration                                                   6s
SPM preprocessing 1 (estimate 1 - TPM registration):                 13s
  Use previous fine affine registration.                             28s
SPM preprocessing 1 (estimate 2):                                    64s
SPM preprocessing 2 (write)                                       
  Write Segmentation                                                 10s
  Update Segmentation                                                 9s
  Update Skull-Stripping                                             11s
  Update probability maps                                             2s
                                                                     32s
Global intensity correction                                           4s
SANLM denoising after intensity normalization (medium)                4s
Fast Optimized Shooting registration                                  2s
   28s
Local adaptive segmentation (LASstr=0.50)                         
  Prepare maps                                                        2s
  Prepare partitions                                                  1s
  Prepare segments (LASmod = 1.00)                                    4s
  Estimate local tissue thresholds (WM)                               8s
  Estimate local tissue thresholds (GM)                              10s
  Intensity transformation                                            0s
  SANLM denoising after LAS (medium)                                  8s
                                                                     34s
ROI segmentation (partitioning)                                   
  Atlas -> subject space                                              5s
  Major structures                                                    5s
  Ventricle detection                                                 5s
  Blood vessel detection                                              4s
  WMH detection (WMHCstr=0.50 > WMHCstr'=0.02)                       11s
  Manual stroke lesion detection                                      0s
  Closing of deep structures                                          1s
  Side alignment                                                      2s
  Final corrections                                                   1s
                                                                     34s
No enhanced blood vessel correction is required                       0s
Amap using initial SPM12 segmentations (MRF filter strength 0.07)    42s
    AMAP peaks: [CSF,GM,WM] = [0.36±0.06,0.68±0.08,0.98±0.05]
Final cleanup (gcutstr=0.25)                                      
  Level 1 cleanup (ROI estimation)                                    1s
  Level 1 cleanup (brain masking)                                     1s
  Level 2 cleanup (CSF correction)                                    0s
  Level 3 cleanup (CSF/WM PVE)                                        0s
                                                                      3s
    1s
Write result maps                                                    12s
Surface and thickness estimation                                  
lh:
  Thickness estimation (0.50 mm³)                                    65s
  Create initial surface                                             29sWarning: [GIFTI] Parsing of XML file C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\surf\lh.layer4x.Test_Forum.gii failed. 

  Topology correction:                                            
------------------------------------------------------------------------
CAT Preprocessing error for Test_Forum:
------------------------------------------------------------------------
Surface file C:Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. 
 1809 - loadSurf
Warning: Escaped character '\%' is not valid. See 'doc sprintf' for supported special characters. 
 1072 - cat_surf_createCS2
  811 - cat_main1639
 1296 - cat_run_job1639
   40 - cat_run_newcatch
 1271 - run_job
  757 - cat_run
   29 - cfg_run_cm
 1717 - local_runcj
  972 - cfg_util
  469 - fill_run_job
  247 - spm_jobman
  356 - Compute
  440 - ComputeInteractive
   28 - process_segment_cat12
   28 - bst_call
 3110 - @(h,ev)bst_call(@process_segment_cat12,'ComputeInteractive',iSubject,iAnatomy)
------------------------------------------------------------------------
Warning: Removing "C:\Users\T4-Admin\Documents\spm12\external\fieldtrip\compat\matlablt2017b" from your path.
See http://www.fieldtriptoolbox.org/faq/should_i_add_fieldtrip_with_all_subdirectories_to_my_matlab_path/ 

Print 'Graphics' figure to: 
  C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\report\catreport_Test_Forum.pdf


Please send mail to vbmweb@gmail.com and copy content of C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\report\cat_Test_Forum.xml and C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\report\catlog_Test_Forum.txt into mail if not already done or attach these files.
  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\label\catROI_Test_Forum.xml" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\surf\lh.central.Test_Forum.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\surf\lh.sphere.Test_Forum.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\surf\lh.sphere.reg.Test_Forum.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\surf\lh.thickness.Test_Forum" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\surf\rh.central.Test_Forum.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\surf\rh.sphere.Test_Forum.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\surf\rh.sphere.reg.Test_Forum.gii" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\surf\rh.thickness.Test_Forum" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

  Remove "C:\Users\T4-Admin\.brainstorm\tmp\cat12_240417_113226\surf\rh.pbt.Test_Forum" from dependency list because it does not exist!
One or multiple files do not exist and were removed from the dependency list 
and following batches will may not work correctly!

17-Apr-2024 11:41:46 - Done    'CAT12: Segmentation'
Item 'Central Surfaces', field 'val': Number of matching files (0) less than required (1).
17-Apr-2024 11:41:46 - Failed to update inputs for 'Extract additional surface parameters'
Error using harvest (line 47)
Dependencies resolved, but not suitable for this item.
In item Central Surfaces:
Dependency 1: CAT12: Segmentation (current release): Left Central Surface (out(1).lhcentral(:))


In file "harvest.m" (v5678), function "harvest" at line 47.

No executable modules, but still unresolved dependencies or incomplete module inputs.
The following modules did not run:
Skipped: Extract additional surface parameters


***************************************************************************
** Error: Line 0:  MATLABbatch system
** Job execution failed. The full log of this run can be found in MATLAB command window, starting with the lines (look for the line showing the exact #job as displayed in this error message)
** ------------------ 
** Running job #1
** ------------------
** 
** 
** Call stack:
** >.m>MATLABbatch system at 0
** 
***************************************************************************