The goal of {mgx2r} is to ease the analysis of mesh and cell graph files created with the MorphoGraphX software. MorphoGraphX is a software for 3D visualisation and segmentation of microscopy images.

How to cite

To cite {mgx2r}, call the R built-in command citation("mgx2r").

Marion Louveaux, & Sébastien Rochette. (2018, October 18). mgx2r: a R package for importing meshes and cell graph files from MorphoGraphX software (Version v0.0.2). Zenodo.


You can install the released version of {mgx2r} from GitHub

Full documentation with {pkgdown}

See full documentation created with {pkgdown} at


Two vignettes are available in the package. You can have access to the vignettes if you installed the package using build_vignettes = TRUE.

To open the Rmd files used to build vignettes:


Read dataset

Some .ply demonstration data coming from my PhD thesis are attached to this package. This dataset is a timelapse recording of the development of a shoot apical meristem of the plant expressing a membrane marker. I took one 3D stack every 12h and have 5 timepoints in total. For more information regarding the generation of this dataset, see"mgx2r-package").

The mesh data are read and converted as mesh 3D using the read_mgxPly function. They contain informatons relative to the geometry of the plant tissue.

The cell graph data are read and converted as mesh 3D using the read_mgxCellGraph function. They contain data relative to the area of the cells and local curvature of the tissue.

myCellGraph <- read_mgxCellGraph(fileCellGraph = fileCellGraph, header_max = 30)

Visualise using {cellviz3d}

The mesh and cell graph data can be visualised using the package {cellviz3d}:


Many thanks to Dr. Soeren Strauss and Dr. Richard Smith from the Max Planck Institute for Breeding Research for their help and advices on the {mgx2r} package.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.