Convert a mesh to CATMAID format

as.catmaidmesh(x, ...)

# S3 method for hxsurf
as.catmaidmesh(x, ...)

# S3 method for mesh3d
as.catmaidmesh(x, ...)

# S3 method for default
as.catmaidmesh(x, title = NULL, comment = NULL, ...)

Arguments

x

A mesh object such as hxsurf or mesh3d object or a list with raw vertices (Nx3) and indices (Nx3).

...

Additional fields for the CATMAID mesh object

title

The title of the object as it will appear in the catmaid volume manager

comment

An informative comment - e.g. how the mesh was generated.

Details

The CATMAID mesh format is documented in the reference below and typically consists of a json encoded object with fields

  • title

  • mesh The mesh itself (a list of length 2)

  • comments (optional)

In R we hold this list in a list object with class catmaidmesh. This can then be posted to the volume manager API.