Menu

Deep learning for NeuroImaging in Python.

Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the gallery for the big picture.

surfify.utils.text2ico(texture, vertices, ref_vertices, atol=0.0001)[source]ΒΆ

Projects a texture associated to an icosahedron onto an other one.

Parameters:

texture : array (N, K)

the input texture to project.

vertices : array (N, 3)

the vertices corresponding to the input texture.

ref_vertices : array (N, 3)

the reference/target vertices.

atol : float, default 1e-4

tolerance when matching the vertices.

Returns:

texture : array (N, K)

the texture projected on the reference icosahedron.

See also

ico2ico

Examples

>>> from surfify.utils import icosahedron, text2ico
>>> from surfify.datasets import make_classification
>>> import matplotlib.pyplot as plt
>>> from surfify.plotting import plot_trisurf
>>> ico2_verts, ico2_tris = icosahedron(order=2)
>>> ico2_std_verts, ico2_std_tris = icosahedron(order=2, standard_ico=True)
>>> X, y = make_classification(ico2_verts, n_samples=1, n_classes=3,
                               scale=1, seed=42)
>>> y_std = text2ico(y, ico2_verts, ico2_std_verts)
>>> plot_trisurf(ico2_std_verts, triangles=ico2_std_tris, texture=y_std,
                 is_label=True)
>>> plt.show()

Follow us

© 2025, nidl developers