Read a neuron saved by Fiji's Simple Neurite Tracer Plugin

  simplify = TRUE,
  components = c("path", "fill"),
  Verbose = FALSE



Path to a file


Additional arguments passed to xmlParse.


Whether to return a single neuron as a neuron object rather than a neuronlist of length 1.


Which components to read in (path or fill). Only paths are properly supported at present (see details).


Whether to print status messages during parsing.


simple neurite tracer .traces files are an XML based format so parsing it depends on installation of the suggested XML package.

They can contain both paths (skeleton lines) and fill information (saved as XYZ coordinates of voxels inside the object). The latter cannot currently be handled very well by read.neuron. If you wish to access them you will probably need to use the private read.fijixml function to do so (see examples).

Your best best if you want to produce a fully 3D object with "width" information would be to generate a 3D mesh using Fiji's 3D viewer. You can do this by selecting the object in the viewer and the choosing File ... Export Surface ... Wavefront while the 3D viewer window is active. The resultant obj file can then be read in by read.neurons. You could use this mesh to find radius information for a skeleton by shooting rays from skeleton to mesh to estimate the radius.



if (FALSE) { n=read.neuron.fiji("my.traces") plot3d(n) fill=read.neuron.fiji("my.traces", components='fill') points3d(fill, col='grey') }