Read a CATMAID selection file

read_catmaid_selection(f, readNeurons = FALSE, getNames = TRUE, ...)

Arguments

f

Path to the .json file saved by CATMAID

readNeurons

Whether or not to read the neurons listed in the selection file

getNames

Whether to fetch the names of the neurons (default TRUE, ignored if neurons are being fetched)

...

Connection parameters passed to read.neurons.catmaid

Value

A data.frame containing the selection information or (if readNeurons=TRUE) a neuronlist containing this information in the attached metadata. The columns will be

  • skid The numeric skeleton id

  • color The colour of the selected neuron in catmaid

  • opacity The opacity (alpha value) of the neuron name

  • name Optionally the name of the neuron

Examples

f=system.file('catmaid-skeletons.json', package = 'catmaid')
read_catmaid_selection(f, getNames=FALSE)
#>       skid   color opacity
#> 1  1180353 #ffff00       1
#> 2  1181286 #ff00ff       1
#> 3  1182615 #0000ff       1
#> 4  1313485 #00ff00       1
#> 5  1334552 #ffffff       1
#> 6  1334561 #00ffff       1
#> 7  1371629 #ff7f00       1
#> 8  2390270 #7fff00       1
#> 9  2390280 #7f7f7f       1
#> 10 3826596 #ff0000       1
#> 11 3842618 #7f7fff       1
#> 12 3853002 #bfbfbf       1
#> 13 3872709 #ff7f7f       1
#> 14 4232956 #7fff7f       1
#> 15 4260599 #ff007f       1
#> 16 1182625 #d8a31e       1
#> 17 1273130 #3fe0d1       1
#> 18 1334538 #ffbfc9       1
#> 19 1338786 #08f62f       1
#> 20 3842350 #f30b61       1
#> 21 3852709 #02fc9f       1
#> 22 3908112 #04fa3f       1
#> 23 3910750 #ffffff       1
#> 24 3927073 #57f608       1
#> 25 3930323 #ff0046       1
#> 26 3931453 #98ff00       1
#> 27 4149101 #89bf3f       1
#> 28 4165941 #00ff51       1
#> 29 4214127 #ff9a00       1
#> 30 4233149 #819cfd       1
#> 31 4260588 #dfae9f       1
#> 32 4276626 #fc82f7       1
#> 33 4311394 #99fa83       1
#> 34 4328317 #1306f8       1
#> 35 4344859 #790a05       1
if (FALSE) {
# read in the neurons for the selection
x=read_catmaid_selection(f, readNeurons=TRUE)
# plot using the CATMAID colour specifications
plot3d(x, col=color)
}