FreeSurfer sphere after merging surface and overlaying MRI display

Hello,

I found out after I merge my mid surface with sub cortical surface, I am not able to make sphere and I encounter the following Error :

Index in position 1 exceeds array bounds. Index must not exceed 15002.

Error in view_surface_sphere (line 149)
sphVertices(il,2) = sphVertices(il,2) + lrOffset;

Error in tree_callbacks>@(h,ev)view_surface_sphere(filenameRelative,'orig') (line 1271)

gui_component('MenuItem', jMenuAlign, [ ], 'Display registration sphere/square', IconLoader.ICON_DISPLAY, [ ], @(h,ev)view_surface_sphere(filenameRelative, 'orig'));

Also, Recently I had a problem with overlaying MRI, it is not working properly. It was working good before updating my brainstorm. I’ve noticed that when I overlay my MRI scan with the gray-matter segmentation, the segmentation does not follow the cursor as I move through the image, and the slice appears to be stuck

Thank you again,

Best regards,

Helia

The issue is the checkbox MIP functional that is checked.
Uncheck it and now MRI and the overlay should display the same slice.

1 Like

This is expected, the imported (from FreeSurfer data) coregistration spheres match each vertex of the cortical surface with a point in a sphere. This is useful as allows to project different cortical surfaces with different number of vertices to an space where they can be easily registered.
https://neuroimage.usc.edu/brainstorm/Tutorials/CoregisterSubjects#Using_FreeSurfer_registered_spheres

This projection to the spheres is only valid for cortical vertices, there is no correspondence between subcortical structures and point in the surface.

Thank your for reporting this, we will improve the error message.

But then. shouldnt the sphere be kept to project cortical sources of that new surface and use only the approximate algorithm to project subcortical sources?

It may seem misleading if only a subset of vertices of the new surface can be projected to the sphere.

Project to where? That sphere is only for the cortical surface.

FYI @tmedani

Let’s say you have subject 1 (cortex + sub cortex) and subject 2, which can be a template, (cortex + sub cortex). You might still want to project data after localization from subject 1 to subject 2.

In this case, for the cortex subject 1 to cortex subject 2, you want to use the FreeSurfer sphere. and use the alternative method to project from sub-cortex to sub-cortex.

I guess you want to match the structures so cortex gets projected to cortex, hippocampus to hippocampus… and when possible, use the sphere.

@edelaire, got you, that's indeed a way to do so. However the thread is not about that, it is about not being able to plot the mixed surface (cortex+subcortical) into the FreeSurfer L/R spheres.

It’s a symptom of the issue. We were trying to achieve the projection I described with Helia, but found that the algorithm was always using the approximation, even for the cortex, and then found that the sphere couldn’t be opened. (sorry if we were not clear :))

Ok, thank for the context, things are clear now

The goal is to improving the projection between mixed surfaces when FreeSurfer coregistration spheres are present in source and destination surfaces. We currently do not have a solution for this scenario, as stated in here.

The fact that each subcortical structure can have different source space: surface or volume, adds complexity to this kind of projection.

Thanks a lot for the clarification. i guess that then, yeah the error could be clearer when trying to view the sphere. Maybe the sphere should actually be removed when merging surfaces (if one of the surface don’t have sphere)

Just to be sure, are sources considered mixed-sources even if both the cortex and the subcortical structures are surfaces? I thought mixed only refers to combinmation of surface + volume sources.

Nop, sources are considered mixed when there is a combination of two or more source spaces: Surface constrained, Surface unconstrained, Volume (unconstrained).

In the Anatomy side a mixed surface makes reference to the cortical + subcortical surfaces

1 Like