This function is a modified version of read.ply function from geomorph R package to specifically read MGX mesh ply files.

read_mgxPly(file, ShowSpecimen = TRUE, addNormals = TRUE, MatCol = 1,
  header_max = 30, my_colors = c("#800000", "#FF0000", "#808000",
  "#FFFF00", "#008000", "#00FF00", "#008080", "#00FFFF", "#000080",
  "#0000FF", "#800080", "#FF00FF"))

Arguments

file

.ply file path. The .ply file stores information relative to a triangular mesh created with MorphoGraphX.

ShowSpecimen

Default to TRUE. Display the newly created mesh3D with the chosen color (defined in MatCol).

addNormals

Default to TRUE.

MatCol

Integer. Default to 1, e.g. first element the header which is not x, y or z. To fill Material$color of mesh 3D.

header_max

Number of lines expected in header. Must be equal or greater to the actual number of lines in the header. Default to 30.

my_colors

Colors for displaying the mesh in an hexadecimal format.

Value

Object of type mesh3D