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.sampling.interpolate_data(data, by=1, up_indices=None)[source]ΒΆ
Interpolate data/texture on the icosahedron to an upper order.
- Parameters:
data : array (n_samples, n_vertices, n_features)
data to be upsampled.
by : int, default 1
number of orders to increase the icosahedron by.
up_indices : list of array, default None
optionally specify the list of consecutive upsampling vertices indices.
- Returns:
upsampled_data : array (n_samples, new_n_vertices, n_features)
upsampled data.
See also
Examples
>>> from surfify.utils import icosahedron, interpolate_data >>> from surfify.datasets import make_classification >>> import matplotlib.pyplot as plt >>> from surfify.plotting import plot_trisurf >>> ico2_verts, ico2_tris = icosahedron(order=2) >>> ico4_verts, ico4_tris = icosahedron(order=4) >>> X, y = make_classification(ico2_verts, n_samples=1, n_classes=3, scale=1, seed=42) >>> y = y.reshape(1, -1, 1) >>> y_up = interpolate_data(y, by=2).squeeze() >>> plot_trisurf(ico4_verts, triangles=ico4_tris, texture=y_up, is_label=False) >>> plt.show()
Follow us