Menu

Deep learning for NeuroImaging in Python.

Note

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

class surfify.models.base.SphericalBase(input_order, n_layers, conv_mode='DiNe', dine_size=1, repa_size=5, repa_zoom=5, dynamic_repa_zoom=False, standard_ico=False, cachedir=None)[source]

Spherical network base information.

Use either RePa - Rectangular Patch convolution method or DiNe - Direct Neighbor convolution method.

Examples

>>> from surfify.models import SphericalBase
>>> ico_info = SphericalBase.build_ico_info(input_order=3, n_layers=2)
>>> print(ico_info.keys())

Init class.

Parameters:

input_order : int

the input icosahedron order.

n_layers : int

the number of layers in the network.

conv_mode : str, default ‘DiNe’

use either ‘RePa’ - Rectangular Patch convolution method or ‘DiNe’ - 1 ring Direct Neighbor convolution method.

dine_size : int, default 1

the size of the spherical convolution filter, ie. the number of neighbor rings to be considered.

repa_size : int, default 5

the size of the rectangular grid in the tangent space.

repa_zoom : int, default 5

control the rectangular grid spacing in the tangent space by applying a multiplicative factor of 1 / repa_zoom.

dynamic_repa_zoom : bool, default False

dynamically adapt the RePa zoom by applying a multiplicative factor of log(order + 1) + 1.

standard_ico : bool, default False

optionally uses a standard icosahedron tessalation. FreeSurfer tesselation is used by default.

cachedir : str, default None

set this folder to use smart caching speedup.

class Ico(order, vertices, triangles, neighbor_indices, down_indices, up_indices, conv_neighbor_indices)

Create new instance of Ico(order, vertices, triangles, neighbor_indices, down_indices, up_indices, conv_neighbor_indices)

conv_neighbor_indices

Alias for field number 6

down_indices

Alias for field number 4

neighbor_indices

Alias for field number 3

order

Alias for field number 0

triangles

Alias for field number 2

up_indices

Alias for field number 5

vertices

Alias for field number 1

classmethod build_ico_info(input_order, n_layers, conv_mode='DiNe', dine_size=1, repa_size=5, repa_zoom=5, dynamic_repa_zoom=False, standard_ico=False, cachedir=None)[source]

Build an dictionnary containing icosehedron informations at each order of interest with the related upsampling and downsampling informations. This methods is useful to speed up processings by caching icosahedron onformations.

Parameters:

input_order : int

the input icosahedron order.

n_layers : int

the number of layers in the network.

conv_mode : str, default ‘DiNe’

use either ‘RePa’ - Rectangular Patch convolution method or ‘DiNe’ - 1 ring Direct Neighbor convolution method.

dine_size : int, default 1

the size of the spherical convolution filter, ie. the number of neighbor rings to be considered.

repa_size : int, default 5

the size of the rectangular grid in the tangent space.

repa_zoom : int, default 5

control the rectangular grid spacing in the tangent space by applying a multiplicative factor of 1 / repa_zoom.

dynamic_repa_zoom : bool, default False

dynamically adapt the RePa zoom by applying a multiplicative factor of log(order + 1) + 1.

standard_ico : bool, default False

optionally uses a standard icosahedron tessalation. FreeSurfer tesselation is used by default.

cachedir : str, default None

set this folder to use smart caching speedup.

Returns:

ico : dict of Ico

the icosahedron informations at different orders.

Follow us

© 2025, nidl developers