Open
Description
It turns out (I think!) you can take just about any subcortical ROI and turn it into a surface using a few FreeSurfer commands:
mri_tessellate aseg.mgz 17 lh.hippocampus.orig
mri_tessellate aseg.mgz 53 rh.hippocampus.orig
mris_extract_main_component lh.hippocampus.orig lh.hippocampus.orig
mris_extract_main_component rh.hippocampus.orig rh.hippocampus.orig
mris_smooth -nw lh.hippocampus.orig lh.hippocampus.smooth
mris_smooth -nw rh.hippocampus.orig rh.hippocampus.smooth
The .smooth surfaces look reasonable for the MNE sample subject:
And they can be inflated to a sphere (so that they can be subdivided via ico/oct) with:
mris_inflate -no-save-sulc lh.hippocampus.smooth lh.hippocampus.inflated
mris_inflate -no-save-sulc rh.hippocampus.smooth rh.hippocampus.inflated
mris_sphere -q lh.hippocampus.inflated lh.hippocampus.qsphere
mris_sphere -q rh.hippocampus.inflated rh.hippocampus.qsphere
Here is a starting API proposal:
setup_source_space(..., surf='...')allowsurfto be a list/tuple of names in aseg.mgz, not justsurf/files. The default would stay'white', which is an alias for (as would bepialand other cortical surfaces)('lh.white', 'rh.white')to create a cortical surface source space.- Currently we use
FIFF.FIFFV_MNE_SURF_LEFT_HEMI = 101for left, 102 for right; maybe we should use1000+aseg_valuefor any non-cortical surface, and left/right hemi would keep their "special" / exceptional values of 101 and 102 (their numbers inaseg.mgzappear to be 2 or 3 and 41 or 42) - The
.kindfor aSourceSpaceswith just these surfaces would be not'surf'(keep this for cortical surf source spaces only) but instead'subcortical_surf'or something. And combinations of cortical surf + subcortical surf would be, as usual,'mixed'. - Figure out morphing somehow. In theory we might be able to do this procedure for
fsaverageand use FreeSurfer commands to align the surfaces (make.sphereinstead of just.qspheresurfaces). Now thatmake_morph_mapsis not horribly slow anymore, creating the morph maps on the fly might be acceptable since these surfaces in general will have way fewer vertices. - Improve plotting to support multiple surfaces.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsTo do

Activity
agramfort commentedon Sep 18, 2019
larsoner commentedon Nov 3, 2023
From a meeting with @jasmainak it seems like a tentative workable plan is:
.surffiles tosubjects_dir/subject/...somewhere (surf/subcort.lh.*?)mne.setup_subcortical_source_space, e.g., if thespacingparameter no longer makes sense.SourceMorphGood next steps would be:
samplemne.setup_source_spacefrom it, then forward, then inverse. Then visualize traces withmatplotlibfor nowdasdiptyajit commentedon Mar 22, 2025
@larsoner I am working on a similar problem. If possible have a look at this:
https://mne.discourse.group/t/morphing-subjects-hippocampus-source-space-to-fsaverage-template/10995