read.fs.surface.obj: Read OBJ format mesh as surface.

View source: R/read_fs_surface.R

read.fs.surface.objR Documentation

Read OBJ format mesh as surface.

Description

This reads meshes from text files in Wavefront OBJ mesh format. This is an ASCII format.

Usage

read.fs.surface.obj(filepath)

Arguments

filepath

string. Full path to the input surface file in Wavefront object mesh format. Files with non-standard vertex colors (3 additional float fields after the vertex coordinates in order R, G, B) are supported, and the colors will be returned in the field 'vertex_colors' if present.

Value

named list. The list has the following named entries: "vertices": nx3 double matrix, where n is the number of vertices. Each row contains the x,y,z coordinates of a single vertex. "faces": nx3 integer matrix. Each row contains the vertex indices of the 3 vertices defining the face. WARNING: The indices are returned starting with index 1 (as used in GNU R). Keep in mind that you need to adjust the index (by substracting 1) to compare with data from other software.

Note

This is a simple but very common mesh format supported by many applications, well suited for export.

See Also

Other mesh functions: faces.quad.to.tris(), read.fs.surface.asc(), read.fs.surface.bvsrf(), read.fs.surface.geo(), read.fs.surface.gii(), read.fs.surface.ico(), read.fs.surface.off(), read.fs.surface.ply(), read.fs.surface.vtk(), read.fs.surface(), read.mesh.brainvoyager(), read_nisurfacefile(), read_nisurface(), write.fs.surface.asc(), write.fs.surface.byu(), write.fs.surface.gii(), write.fs.surface.mz3(), write.fs.surface.vtk(), write.fs.surface()


freesurferformats documentation built on May 29, 2024, 5:29 a.m.