Access parcellation maps in surface space

siibra also provides basic access to surfaces. A popular reference space for the human brain is the freesurfer fsaverage surface. It comes in three variants: white matter surface, pial surface, and inflated surface. Each is shipped with left and right hemispheres separately.

For plotting meshes, most python libraries can be employed. We recommend the plotting module of nilearn.

import siibra
from nilearn import plotting

Load the Julich-Brain parcellation.

jubrain = siibra.parcellations.get("julich 2.9")

We can tell volumetric from surface spaces using their is_surface attribute.

for space in jubrain.spaces:
    if space.provides_mesh:
        print(space)
Space: MNI 152 ICBM 2009c Nonlinear Asymmetric
Space: freesurfer fsaverage
Space: freesurfer fsaverage6
Space: hcp32k
Space: MNI Colin 27

The surface map is accessed using the get map method where we specify the space. Note that we call the method here on the parcellation object, while previous examples usually called it on an atlas object.

mp = jubrain.get_map(space='fsaverage6')

For surfaces, the fetch() method accepts an additional parameter ‘variant’. If not specified, siibra displays the possible options as a list fetches the first one from the list. Now let us fetch a specific variant and also the hemisphere fragment

mesh = mp.fetch(variant="inflated", fragment="left")

# The returned structure is a dictionary of three numpy arrays representing the vertices, faces, and labels respectively.
# Each vertex defines a 3D surface point, while the faces are triplets of indices into the list of vertices, defining surface triangles.
# The labels provide the label index associated with each vertex.
print(mesh.keys())
dict_keys(['verts', 'faces', 'labels'])

Most meshes are shipped with a color map which we can fetch from the map object by

jubrain_cmap = mp.get_colormap()

# Now we can plot the mesh
plotting.view_surf(
    surf_mesh=[mesh['verts'], mesh['faces']],
    surf_map=mesh['labels'],
    cmap=jubrain_cmap, symmetric_cmap=False, colorbar=False
)


Total running time of the script: (0 minutes 6.001 seconds)

Gallery generated by Sphinx-Gallery