<div dir="ltr"><div>Hi Jan-Mathijs, thanks for checking this. I've looked into the script and realized that, for the issue presented above, the wb_command function was expecting the file called "single_subj.L.sulc.native.shape.gii" but it seems an earlier wb function saved the expected file as "lh.single_subj.L.sulc.native.shape.gii". After some trial and error I am able to extract and display the decimated cortical sheets and their corresponding atlases correctly with Fieldtrip visualization functions. Thanks for your help!</div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="border:0px;font-stretch:inherit;line-height:inherit;margin:0px;padding:0px;vertical-align:baseline;color:rgb(0,0,0)"><font face="arial, sans-serif">Thanks,</font></div><div style="border:0px;font-stretch:inherit;line-height:inherit;margin:0px;padding:0px;vertical-align:baseline;color:rgb(0,0,0)"><font face="arial, sans-serif">Michael</font></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 15, 2025 at 9:14 AM Schoffelen, J.M. (Jan Mathijs) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Hi Michael,
<div><br>
</div>
<div>The error suggests that an expected file is missing. Could it be that freesurfer produced incomplete output? (in other words: do you get an error only for this particular subject?)</div>
<div>If you don’t need the sulc/curv/thickness information, you can also try and bypass this error by commenting out the respective lines of code in the bash-script (including the lines that rely on using the newly create .gii files of those metrics).</div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div>
<div><br>
<blockquote type="cite">
<div>On 8 May 2025, at 15:37, Michael Houston via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div>Hi, everyone! I am trying to create a cortical sheet source model from the standard colin27 brain with accompanying DKT atlas for EEG source reconstruction (single_subj.nii in Fieldtrip template directory). After doing recon-all in FreeSurfer, the resulting
meshes are far too large ~160k vertices per hemisphere which is taking too long to run the source analysis on. I followed the instructions according to this tutorial (<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Ftutorial%2Fsource%2Fsourcemodel%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cc0562f63b6cb41d679fe08dd96631b53%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638832074729027459%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=ibFBJBWp92w9pnGLWVA3KVl24xkw5UqGtxYhP%2FMyaTg%3D&reserved=0" originalSrc="https://www.fieldtriptoolbox.org/tutorial/source/sourcemodel/" target="_blank">https://www.fieldtriptoolbox.org/tutorial/source/sourcemodel/</a>)
and set up the HCP-Workbench and copied the requested directory contents to a common folder to use ft_postfreesurferscript.sh to make the lower resolution cortical meshes.</div>
<div><br>
</div>
<div>While I can get the script to run, I am facing the output and error copied below. If there is any other information I should provide please let me know. I am confused about this output because it looks like the error file is one that should be created
by the script however it is not found. I would greatly appreciate any insight on how to fix this.:</div>
<div><br>
</div>
<div>Command</div>
<div>--------------</div>
<div>/mnt/c/Users/mjame/Documents/MATLAB/fieldtrip-20240504/bin/ft_postfreesurferscript.sh /usr/local/freesurfer/7.4.1/subjects single_subj /usr/local/freesurfer/7.4.1/subjects/workbench_freesurfer</div>
<div><br>
</div>
<div>Output & Error</div>
<div>--------------------</div>
<div>START: FS2CaretConvertRegisterNonlinear<br>
Saving /usr/local/freesurfer/7.4.1/subjects/single_subj/workbench/single_subj.L.white.native.surf.gii as a surface in TKREGISTER space<br>
Saving /usr/local/freesurfer/7.4.1/subjects/single_subj/workbench/single_subj.L.pial.native.surf.gii as a surface in TKREGISTER space<br>
Saving /usr/local/freesurfer/7.4.1/subjects/single_subj/workbench/single_subj.L.sphere.reg.native.surf.gii as a surface in TKREGISTER space<br>
Saving /usr/local/freesurfer/7.4.1/subjects/single_subj/workbench/single_subj.L.sphere.native.surf.gii as a surface in TKREGISTER space<br>
<br>
While running:<br>
wb_command -set-structure /usr/local/freesurfer/7.4.1/subjects/single_subj/workbench/single_subj.L.sulc.native.shape.gii CORTEX_LEFT<br>
<br>
ERROR: NAME OF FILE: single_subj.L.sulc.native.shape.gii<br>
PATH TO FILE: /usr/local/freesurfer/7.4.1/subjects/single_subj/workbench<br>
<br>
File does not exist.</div>
<div><br>
</div>
<div>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div style="border:0px;font-stretch:inherit;line-height:inherit;margin:0px;padding:0px;vertical-align:baseline">
<font face="arial, sans-serif">Thanks,</font></div>
<div style="border:0px;font-stretch:inherit;line-height:inherit;margin:0px;padding:0px;vertical-align:baseline">
<font face="arial, sans-serif">Michael</font></div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cc0562f63b6cb41d679fe08dd96631b53%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638832074729053073%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=CMtcAKbtUJnL9m7rE0V%2FjmJegC1EnVN%2FqsV5Rl0zXBs%3D&reserved=0" originalSrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cc0562f63b6cb41d679fe08dd96631b53%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638832074729067967%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=r5amM3sR2rIL%2F0TBT586zyywrSBXzOWfOiIN7RLd3Iw%3D&reserved=0" originalSrc="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cc0562f63b6cb41d679fe08dd96631b53%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638832074729080597%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=XAGRj3bycraAJ%2FSIoapLlGstwGpOLwDtHG%2FhFljTwYQ%3D&reserved=0" originalSrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cc0562f63b6cb41d679fe08dd96631b53%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638832074729092974%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=tNGfwo4n7KzIlOsqQTtpmhWkE1EFl%2BXBQJ2vYDsF8iA%3D&reserved=0" originalSrc="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>