enigmatoolbox.mesh.mesh_io.read_surface¶
-
enigmatoolbox.mesh.mesh_io.
read_surface
(ipth, itype=None, return_data=True, update=True)[source]¶ Read surface data (author: @OualidBenkarim)
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. 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 – Surface as a filter or BSPolyData.
- Return type
BSAlgorithm 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