Simple Neurite Tracer
Plugin for ImageJ
Introduction
This plugin is designed to allow the semi-automatic tracing
of neurons or other tube-like structures through 3D image
stacks. The idea was to produce an interface somewhat like NeuronJ
but which worked with 3D stacks and was free software. If you
want to get a quick idea of how it works, please have a look
at the screencasts below.
This is alpha quality software, still under active
development; please bear this in mind when using
it.
Licensing
This plugin is free software, licensened under the GNU GPL (with
the exception of the pal source files, which are covered by
the GNU
LGPL) so please do contribute any patches or suggestions
that you think would be useful. Please email me at mark-imagej@longair.net
or at my Edinburgh email address at the foot of this page with
any feedback. The source code is contained in the
Fiji git repository in the "tracer" subdirectory of the
"VIB" submodule.
Installation
This plugin is now bundled as part of Fiji
and this is the only currently supported way of using the
plugin.
You should download and install Fiji,
and should find "Simple Neurite Tracer" in the Plugins >
Segmentation menu.
Instructions
There is a page with basic
instructions for using the plugin.
If you are having problems then these are most likely to be
related to ImageJ not claiming enough memory, since this
plugin needs to use much more memory than ImageJ would for
basic manipulation of the image. If you have out-of-memory
errors then you should refer to the "memory" section of the the ImageJ
installation guide for your platform to see how to
increase this limit.
If you're having problems playing these videos
on Mac OS, I think the simplest solution is to install the VLC media
player. On Windows if you install ffdshow
then you should be able to play them in Windows Media Player
or you can use the Windows GUI
version of MPlayer
I have a couple of screencasts of this plugin in operation,
admittedly from a much earlier version. However, they should
give you an idea of the functionality of the plugin.
This first screencast shows the basic operation of the
plugin on a fairly indistinct confocal scan. After about a
minute I turn on the option to use a Hessian-based cost
function for the search, based on code written by Stephan
Preibisch at the Janelia Farm Hackathon. You may notice that
the searches after that point follows the neurons more
closely. However, in some cases that finds erroneous paths or
the naive cost function performs better, so in practice one
switches back and forth. [Note that this demo was recorded
from an earlier version that didn't have support for branching.]
This next video demonstrates more of the functionality
that I added at Janelia Farm, in particular the fitting of
centre lines and the filling-out of neurons. (The centre-line
fitting is removed from this version until I've made some
further fixes to this.) I use Benjamin
Schmid's 3D viewer in this demo for visualizing the
results, and as an example export the mesh and load it into
Blender at the end - thanks to Albert Cardona for his advice
on all matters Blender.
File Format
The traces files written by this plugin are gzip compressed
XML files. The DTD for this format can be found at the top of
each file.
This plugin was written by myself, Mark Longair, except for
the following important sections:
- The code for doing Gaussian
convolutions of the image and the calculation of principal
curvatures was written by Stephan Preibisch
- The code for eigenvalue decomposition and loading of
AmiraMesh label files was written by Johannes Schindelin.
- The code for generating meshes of neurons for the 3D
viewer was written by Albert Cardona for
TrakEM2.
- This plugin also incorporates code from the LGPL licensed
PAL
library, although the functionality that relies on this is
not currently exposed in this version.
Many thanks to all of those authors for releasing their
code under the GPL.
Acknowledgments
This software was developed during my PhD, funded by the EPSRC
/ MRC life sciences interface programme, and in particular
the Doctoral
Training Centre in Neuroinformatics at the University of
Edinburgh. A substantial part of the later development of
this plugin was done during the Janelia Farm Hackathon
of 2007, and I owe a debt of thanks to the Howard Hughes
Medical Institute for making it possible for me to go to that
event. Thank-you also to Arnim Jenett, Adrianna Teriakidis
and Benny Lam for their feedback and help with testing various
versions of this plugin.
Known Bugs and Planned Features
- The interface for creating fills is difficult to use. In
addition, it has major drawbacks, such as not being able to
set different fill thresholds for different subpaths. I
intend to overhaul this part of the plugin and replace the
filling algorithm with one based on level set / fast marching
methods.
- It would be nice to use a MIP based interface of some
kind, since there are biases in the neurons that one selects
arising from the "three pane" view.
- The results of fitting radiuses and centres to a path need
to be smoothed and have outliers removed, and currently
there's no facility for that, so I've removed that support
from the current version. However, the plan is to reintroduce
it in the future.
- Some people find the three pane view confusing since you
need to do quite a bit of manual window positioning, so it
would be nice optionally replace that with three panes in a
single container.
- At the moment most of the analysis that you would want to
do of the traces files has to be done by parsing them
separately. It would be nice to have an option to give some
basic statistical information about the traces from the
interface, or export them to a format parseable by
GraphViz.
- The file format is currently very inefficient for storing
fills. The traces files are compressed with gzip, which helps
somewhat with this, but ultimately I will have to change the
format.
- The plugin should support different Hessian-based metrics
for detecting neuron-like structures. In addition, it would
be good to offer an option to detect structures on different
scales. Both of these can be implemented currently by
changing the code used to preprocess the images (see below),
but I'm not sure whether it would be useful to offer some of
these options directly in the plugin interface.
- The path and fill lists are small and awkward to use on
some platforms. The plan is to make this separate window in a
future version.
Changelog
In version 1.2.3:
- Fixed a number of bugs, including an important one which
caused the Hessian-based analysis to perform extremely poorly
in many cases.
- I've decided to give up on packaging a specific jar file
and just distribute the tracer along with Fiji
- An experimental live 3D display of the tracing progress.
(This has a known bug that on some graphics card the 3D
display will steal the focus when adding content to the
viewer.)
In version 1.2.2:
- All ImageJ image types are now supported (8 bit, 16 bit
short, 32 bit float and RGB). In the case of RGB images, the
plugin offers to convert the image to luminance values before
tracing.
-
Due to popular demand, the plugin now works on single 2D
images as well as 3D image stacks.
- For tracing batches of images you can now preprocess them so that you
don't need to wait for the Gaussian generation (and eigenvalue
calculation) while tracing. If the image that you're tracing
is called, say, hello.lsm then the tracer will try to
open hello.tubes.tif to use for values for the
tracing search.
- The canvases used in the tracer now indicate
visually that a new path has been started (and whether it is a
branch or not).
- Lots of refactoring of the code, mostly not visible to the
user (although you may notice that the performance is slightly
better.)
In version 1.1.3:
- The choice of "Control" as a modifier on Mac OS turned out
to be unfortunate since clicking with "Control" held down
would bring up a context menu. On Mac OS only this has been
changed to Alt.
- Throw an error if we detect that you're trying to load a
traces file for a mis-matched.
- "Create Image from Fill" now works again.
- The 1.1.2 release accidentally used the Java 1.6 class
format.
Mark
Longair