This package provide access to the API exposed by the CATMAID (C ollaborative A nnotation T oolkit for M assive A mounts of I mage D ata) web tool. This includes a bridge to the neuroanatomy toolbox (R package nat), thereby allowing analysis and visualisation of neuronal skeletons.

To use, first call catmaid_login to authenticate to a catmaid server. You can then use functions such as catmaid_get_neuronnames or catmaid_get_compact_skeleton to query the server. You can also roll your own server queries using the low-level catmaid_fetch command.


By default all query functions will use the server/authentication details specified by the last successful call to catmaid_login unless a catmaid_connection object is provided as an argument.

Default Login

See catmaid_login for details of the environment variables that can be set to specify default login values. It makes sense to set these in your .Renviron file if you regularly use a specific CATMAID server. Note that you can have different .Renviron files in the home folder of different Rstudio projects if you regularly use more than one CATMAID server. Note that the use of environment variables is now preferred over setting R options.

Unit tests

Unit tests can be run as per the examples section below. In order to do live tests you will need to set environment variables with your catmaid login credentials using the function catmaid_connection_setenv.


The first version of this package was based in large part on python code at See for further details about CATMAID and for a list of URLs that the web API accepts.


Maintainer: Gregory Jefferis (ORCID)

Other contributors:


if (FALSE) {
## test package

## same but use appropriate login info
conn=catmaid_login(server="", user="calvin", password='hobbes')
## alternatively, login using an API token
# see for how to get one
                   token = "9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b")