brainspace.mesh.mesh_io.read_surface

brainspace.mesh.mesh_io.read_surface(ipth, itype=None, return_data=True, update=True)[source]

Read surface data.

See itype for supported file types.

Parameters:
  • ipth (str) – Input filename.
  • itype ({'ply', 'vtp', 'vtk', 'fs', 'asc', 'gii'}, optional) – Input file type. If None, it is deduced from ipth. Files compressed with gzip (.gz) are also supported. Default is None.
  • return_data (bool, optional) – Whether to return data instead of filter. Default is False
  • update (bool, optional) – Whether to update filter When return_data=True, filter is automatically updated. Default is True.
Returns:

output (BSAlgorithm or BSPolyData) – Surface as a filter or BSPolyData.

Notes

Function can read FreeSurfer geometry data in binary (‘fs’) and ascii (‘asc’) format. Gifti surfaces can also be loaded if nibabel is installed.

See also

write_surface