Voronoi interpolation error

Hello,
I am trying to perform a 3D reconstruction using fNIRS data for an individual undergoing a cognitive task. I was able to proceed with the preprocessing steps (applying filters, excluding bad channels, and performing block analysis). However, I am having difficulty generating the 3D model.

I am following the NIRSTORM tutorial (https://neuroimage.usc.edu/brainstorm/Tutorials/NIRSTORM), but when I reach the Voronoi interpolation step, the error below appears, and I can’t move forward.

Why does this error occur?

Is there any way to solve it?

Regards,
Arthur

Hello,

Thanks for the bug repport.
We made some change to the voronoi code this week. Can you make sure you have the last version of nirstorm by updating the plugin and try again ?

If it doesnt work, can you please take a screenshot of your datrabase (espetially the anatomy tab) and of the segmentation 5 tissue.

Hello,

I am using the files and data from the folder nirstorm_tutorial_2024.zip. I can analyze the data and import the file segmentation_5tissues.nii without any issues. However, when I run Voronoi, the following error now appears:

What could it be?

Regards,
Arthur

Would anyone be able to help me with this question?

Regards,
Arthur

Hello Arthur,

Please try what was suggested in the post above and post the result:

So far i was not able to reproduce.

Could you also try to execute the following script (begening of nirstorm/scripts/tutorial_nirstorn_2024.m at master · Nirstorm/nirstorm · GitHub):
(you will need to replace tutorial_dir with the path to the dataset)



tutorial_dir = "";

SubjectName                 = 'sub-01';
FidFile                     = fullfile(tutorial_dir, SubjectName, 'anat','T1w.json');
FSPath                      = fullfile(tutorial_dir, 'derivatives', 'FreeSurfer/',SubjectName);
TissueSegmentationFile      = fullfile(tutorial_dir, 'derivatives', 'segmentation',SubjectName,'segmentation_5tissues.nii');
scoutPath                   = fullfile(tutorial_dir, 'derivatives', 'segmentation',SubjectName,'scout_hand.annot');

% Start a new report
bst_report('Start');

%% Part 1. Importing subject anatomical data
json = bst_jsondecode(FidFile);
sFid = process_import_bids('GetFiducials',json, 'voxel');

bst_process('CallProcess', 'process_import_anatomy', [], [], ...
    'subjectname', SubjectName, ...
    'mrifile',     {FSPath, 'FreeSurfer+Thick'}, ...
    'nvertices',   15000, ...
    'nas',         sFid.NAS, ...
    'lpa',         sFid.LPA, ...
    'rpa',         sFid.RPA, ...
    'ac',          sFid.AC, ...
    'pc',          sFid.PC, ...
    'ih',          sFid.IH);

[sSubject, iSubject]  = bst_get('Subject', SubjectName);

% Import tissue segmentation
import_mri(iSubject, TissueSegmentationFile, '', 0, 0, 'segmentation_5tissues');

% Remesh skin to 10 000 vertices, iso-mesh
tess_remesh(sSubject.Surface(sSubject.iScalp).FileName ,10000 )

% Choose mid-surface as default cortical surface
iCortex = find(contains({sSubject.Surface.FileName},'tess_cortex_mid_low.mat'));
db_surface_default(iSubject, 'Cortex',iCortex);
panel_protocols('RepaintTree');

% Import hand-know region
import_label(sSubject.Surface(iCortex).FileName, scoutPath,0);

% Compute voronoi-interpolation
bst_process('CallProcess', 'process_nst_compute_voronoi', [], [], ...
    'subjectname',  SubjectName, ...
    'do_grey_mask', 1);

ReportFile = bst_report('Save', []);
bst_report('Open', ReportFile);