SEEG Epileptogenicity maping Surface

Hello,
I'm currently doing this Tutorial with Matlab R2025a :

I am near the end of the tutorial where we use the Epileptogenicity maps > Surface but it doesn't work. Here's the error message :


18-Aug-2025 23:58:51 - Running job #1
------------------------------------------------------------------------

18-Aug-2025 23:58:51 - Running 'fMRI model specification'

SPM12: spm_fMRI_design (v7739) 23:58:51 - 18/08/2025
========================================================================

Saving fMRI design : ...SPM.mat saved

SPM12: spm_fmri_spm_ui (v7738) 23:58:51 - 18/08/2025
========================================================================
Mapping files : ...done
Calculating globals : ...done

Saving SPM configuration : ...SPM.mat saved
Saving SPM configuration : ...SPM.mat saved
Completed : 23:58:52 - 18/08/2025
18-Aug-2025 23:58:52 - Done 'fMRI model specification'
18-Aug-2025 23:58:52 - Running 'Model estimation'

SPM12: spm_spm (v7738) 23:58:52 - 18/08/2025
========================================================================

Chunk 1/1 : ...done

18-Aug-2025 23:58:54 - Failed 'Model estimation'
Error using [spm_spm](matlab:matlab.lang.internal.introspective.errorDocCallback('spm_spm', 'C:\Users\Miu\.brainstorm\plugins\spm12\spm12\spm_spm.m', 652)) ([line 652](matlab: opentoline('C:\Users\Miu\.brainstorm\plugins\spm12\spm12\spm_spm.m',652,0)))
Please check your data: There are no inmask voxels.
In file "C:\Users\Miu\.brainstorm\plugins\spm12\spm12\spm_spm.m" (v7738), function "spm_spm" at [line 652](matlab:opentoline('C:\Users\Miu\.brainstorm\plugins\spm12\spm12\spm_spm.m', 652, 0)).
In file "C:\Users\Miu\.brainstorm\plugins\spm12\spm12\config\spm_run_fmri_est.m" (v7354), function "spm_run_fmri_est" at [line 36](matlab:opentoline('C:\Users\Miu\.brainstorm\plugins\spm12\spm12\config\spm_run_fmri_est.m', 36, 0)).

18-Aug-2025 23:58:54 - Running 'Contrast Manager'

SPM12: spm_contrasts.m 23:58:54 - 18/08/2025
========================================================================
Contrasts folder : .\SPM_EI_run-02_120_200_3_0
18-Aug-2025 23:58:54 - Failed 'Contrast Manager'
Error using [spm_run_con](matlab:matlab.lang.internal.introspective.errorDocCallback('spm_run_con', 'C:\Users\Miu\.brainstorm\plugins\spm12\spm12\config\spm_run_con.m', 34)) ([line 34](matlab: opentoline('C:\Users\Miu\.brainstorm\plugins\spm12\spm12\config\spm_run_con.m',34,0)))
This model has not been estimated.
In file "C:\Users\Miu\.brainstorm\plugins\spm12\spm12\config\spm_run_con.m" (v7738), function "spm_run_con" at [line 34](matlab:opentoline('C:\Users\Miu\.brainstorm\plugins\spm12\spm12\config\spm_run_con.m', 34, 0)).

The following modules did not run:
Failed: Model estimation
Failed: Contrast Manager

***************************************************************************
** Error: [process_epileptogenicity] Epilepsy > Epileptogenicity maps (A=Baseline,B=Seizure)
** 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
**

Could you please help me with this problem ?

Thank you a lot

Hi @Miu,

As mentioned in the other post reporting the same error (Please check your data: There are no inmask voxels.), please provide some screenshots of your electrodes and the MRI that is being used.

Hello, thank you for your help @Raymundo.Cassani ,

Yes, I’m using the dataset provided from the tutorial.

Here ‘s a screenshot for the electrodes and MRI

Thanks for the information and details.
We will check on our side, and continue with the conversation

@Miu, we have checked on our side, and it is possible to complete the tutorial without reproducing the reported error.

Here some things you could try to figure out the issue:

  1. Are you able to run the tutorial script tutorial_epileptogenicity without errors?

With Brainstorm running execute it as:

tutorial_epileptogenicity(tutorial_dir);

where tutorial_dir is the path of the directory that contains the directory ``

  1. Are you able to compute the Volume epileptogenicity map for Seizure 1?
    https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#Volume:_Seizure_1

  2. Try to compute the Surface epileptogenicity map for Seizure 2 and Seizure 3 independently. I.e., In FileA and FileB sides there will be only file each from Seizure2, then run. Repeat for Seizure 3.
    This with the goal of testing if the error is related to one specific set of files
    https://neuroimage.usc.edu/brainstorm/Tutorials/Epileptogenicity#Surface:_Seizure_2.2F3

  3. If the error persist, please paste all the messages that were printed in the Command window before the error message. To avoid a very long post, you can add the error as "code" using the 3 backticks (```):

    ```
    YOUR ERROR CODE IN HERE
    xxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxx
    ```