enigmatoolbox.mesh.mesh_io.write_surface

enigmatoolbox.mesh.mesh_io.write_surface(ifilter, opth, oformat=None, otype=None)[source]

Write surface data (author: @OualidBenkarim)

See otype for supported file types.

Parameters
  • ifilter (BSAlgorithm or BSDataObject) – Input filter or data.

  • opth (str) – Output filename.

  • oformat ({'ascii', 'binary'}, optional) – File format. Defaults to writer’s default format. Only used when writer accepts format. Default is None.

  • otype ({'ply', 'vtp', 'vtk', 'fs', 'asc', 'gii'}, optional) – File type. If None, type is deduced from opth. Default is None.

Notes

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

See also

read_surface()