polygon.soup.to.indexed.mesh: Turn polygon soup into indexed mesh.

Description Usage Arguments Value

View source: R/read_fs_surface.R

Description

Some mesh file formats like STL do not store the faces as indices into a vertex list ('indexed mesh'), but repeat all vertex coordinates for each face ('polygon soup'). This function creates an indexed mesh from a polysoup.

Usage

1
polygon.soup.to.indexed.mesh(faces_vertex_coords, digits = 6)

Arguments

digits

the precision (number of digits after decimal separator) to use when to determine whether two x,y,z coords define the same vertex.

face_vertex_coords

numerical matrix with *n* rows and 3 columns, the vertex coordinates of the faces. Each row contains the x,y,z coordinates of a single vertex, and three consecutive vertex rows form a triangular face.

Value

an indexed mesh, as an 'fs.surface' instance (see read.fs.surface).


neuroconductor/freesurferformats documentation built on May 20, 2021, 3:15 p.m.