mcot.surface.test_data

Functions

create_spherical_cortex([norient])

Creates a cortex with a WM/GM boundary (at radius of 1) and a pial surface (at a radius of 2)

mesh_to_cortex(mesh[, cortex])

Converts mesh to cortical surface by defining it as left or right cortex.

read_fsaverage_cortex()

Reads all surfaces in the fsaverage directory.

read_fsaverage_surface()

Reads the left pial surface from the fsaverage directory.

rectangle([size, inward_normals])

generate a rectangle as triangular mesh.

sphere([norient])

Generates a mesh of a unit sphere with norient vertices per hemisphere.

triangle_mesh([ndim])

Draws triangle between (0, 0), (1, 0), (0, 1)

create_spherical_cortex

mcot.surface.test_data.create_spherical_cortex(norient=300)mcot.surface.cortex.Cortex[source]

Creates a cortex with a WM/GM boundary (at radius of 1) and a pial surface (at a radius of 2)

Parameters

norient – number of vertices on the sphere

Returns

spherical cortex

mesh_to_cortex

mcot.surface.test_data.mesh_to_cortex(mesh: mcot.surface.mesh.Mesh2D, cortex='left')mcot.surface.cortical_mesh.CorticalMesh[source]

Converts mesh to cortical surface by defining it as left or right cortex.

Parameters
  • mesh – surface mesh

  • cortex – ‘left’ or ‘right’, defining which cortex this should represent

Returns

same mesh but as a CorticalMesh

read_fsaverage_cortex

mcot.surface.test_data.read_fsaverage_cortex()[source]

Reads all surfaces in the fsaverage directory.

read_fsaverage_surface

mcot.surface.test_data.read_fsaverage_surface()[source]

Reads the left pial surface from the fsaverage directory.

rectangle

mcot.surface.test_data.rectangle(size=(1.0, 1.0, 1.0), inward_normals=True)[source]

generate a rectangle as triangular mesh.

Parameters
  • size – rectangle size (in arbitrary units)

  • inward_normals – ensure the normals are pointing inwards (otherwise they point in random directions.

Returns

triangular mesh covering the surface of a rectangle

Return type

Mesh2D

sphere

mcot.surface.test_data.sphere(norient=300)mcot.surface.mesh.Mesh2D[source]

Generates a mesh of a unit sphere with norient vertices per hemisphere.

Parameters

norient – number of vertices

Returns

mesh of sphere with radius 1

triangle_mesh

mcot.surface.test_data.triangle_mesh(ndim=3)mcot.surface.mesh.Mesh2D[source]

Draws triangle between (0, 0), (1, 0), (0, 1)

Parameters

ndim – number of dimensions of the space (triangle will be in the first two)

Returns

mesh