Copy a protocol downsampling the number of vertices

Hello,

I have imported the anatomy for all my subjects and checked/adjusted all the fiducial points manually using the MRI viewer. Unfortunately, I did that with the 15000 vertices for the cortex surface and I actually "only" need 5000 vertices.
I would therefore want to kind of copy the first protocol in a second protocol but downsampling the number of vertices.

  1. Is there an easy and clean way to copy a protocol but downsampling to less vertices? (EEG/MEG data have been imported but not processed yet so no worries about them)

Alternatively, I wrote a script (similar to the tutorial_neuromag.m) where I recursively access the fiducials from the subjectimage_MRI.mat of my first protocol to set them automatically when importing the anatomy folder for my second protocol:

% Process: Import anatomy folder
bst_process('CallProcess', 'process_import_anatomy', [], [], ...
'subjectname', SubjectName, ...
'mrifile', {AnatDir, 'FreeSurfer'}, ...
'nvertices', 5000, ...
'nas', subjectimage_MRI_protocol1.SCS.NAS, ...
'lpa', subjectimage_MRI_protocol1.SCS.LPA, ...
'rpa', subjectimage_MRI_protocol1.SCS.RPA,...
'ac', subjectimage_MRI_protocol1.NCS.AC, ...
'pc', subjectimage_MRI_protocol1.NCS.PC, ...
'ih', subjectimage_MRI_protocol1.NCS.IH);

This works fine, but then when I look at the subjectimage_MRI.mat structure of the new Protocol generated, the subjectimage_MRI.NCS structure does not contain the R, the T or the Origin, only the coordinates I gave. These R,T and Origin are automatically filled in if I don't specify AC/PC/IH because MNI normalization is automatically performed if left empty. My second question is then:
2. After calling and completing the process 'process_import_anatomy' with empty 'ac','pc','ih', can I set them through command line and not MRI viewer? OR can I launch the MNI normalization through script? OR is there a problem at all if these fields are empty? I was hoping to have everything kept equal between protocols but the number of surface vertices.

Thanks a lot in advance!
Julie

you can just downsample the surfaces without changing any other data.
you can just right-click on the surface and then downsample it.
15000 is the recommended number if you want to perform source localization.

Thanks a lot for your fast response! Yes indeed!, sorry I didn't see this option! From the 3 proposed resampling methods, the iso2mesh/CGAL library would be the one that gives the result I would have had if I entered 5000 vertices from the beginning on?

From the 3 proposed resampling methods, the iso2mesh/CGAL library would be the one that gives the result I would have had if I entered 5000 vertices from the beginning on?

No. When importing the anatomy folder, Brainstorm downsamples the surfaces using Matlab's reducepatch function. This is also the only solution to keep all the atlases.
So use the first option.

1 Like

great thanks!!