Simple Neurite Tracer for multiple 2D images


I am trying to see if I can migrate our quantification workflow from NeuronJ, which is not really maintained, to Simple Neurite Tracer. We are tracing segments of neuronal processes on tens of 2D images before quantifying length, intensities etc.

The one thing I don’t manage to do with SNT is to process one 2D image after another in a fast way, without closing the image, closing SNT, opening the next image and relaunching SNT, all this manually. Is there a shortcut in SNT to do this (open the next image in the current folder in SNT)? I can’t group the images by z-stack (they would be interpreted as a 3D image) or t-stacks (SNT refuses to process them).

Ideally there would be an option to process a whole open stack in forced 2D mode as just a series of 2D images, exporting all the traces as ROIs that would be affected to the right slice (the corresponding 2D image) - that would allow instant quantification downstream.

Thanks for your help - I guess I should tag @tferr here.

Hi @christlet,

An “Open next command” would be interesting, but because of all the things that happen when SNT loads an image (e.g, the UI changes when a multi-dimensional image is detected), it would only be useful when iterating over images of the same type, dimensions, etc. I fear havoc if someone starts iterating over images of different type. If you really feel strongly about it it could be looked into, but right now my priority is to have the SNT rewrite on ‘feature freeze’ so that it can be officially released early spring.

What do you mean SNT refuses to process them? I just opened the Mitosis 5D sample image without problems. Is your installation up-to-date? Are you subscribed to the Neuroanatomy update site?
This is actually the current workaround: Place your 2D images in a common T-stack (a multichannel composite would also work, but the number of channels is currently limited in IJ1), and SNT will load them as a single image. You can then use the Data source in SNT’s Options tab to choose the channel and /or frame to be traced. E.g, in the screenshot below I randomly traced 3 paths, each associated with a 2D image loaded from the “Fluorescent Cells” sample image. The largest annoyance was that I had to manually tag the source channel manually: it would be nice to extend the existing auto-tags to the data source Channel/Frame position.

Note that you can already do most of that using the “Analyze” commands in the Path Manager (used in the screenshot to plot intensity profiles). For more advanced quantifications, have a look at the template scripts, e.g., “Scripted Tracing Demo”. The only caveat to all this is that documentation is currently inexistent so do let me know if you run into problems.

Hi Tiago,

Thanks a lot for your detailed answer. Indeed I was using the base SNT from Fiji which was outdated. I am now playing with the newer one from the Neuroanatomy update site. I’m trying with a stack with five 2D images converted into a t-stack (using the “Stack to Hyperstack” command) and use it as input for SNT. However, SNT seems to interpret it as a z-stack, with no possibility to select the t point where I want to trace, and displaying XZ and YZ views if asked. Is this intended?

Unrelated: the dialog for sigma and factor uses the system-wide locale decimal separator to display the values in the box ("," in my case) but then throws an error when clicking “OK” because it does not recognize what’s in the box as a number. You have to manually replace “,” by “.” every time you use the dialog. It would be good to force the use of the “.” separator independently of the system-wide locale, as is the case everywhere in ImageJ/Fiji.

That seems a bug :slight_smile: . If you save that stack as a tif file, does IJ open it with the proper dimensions after the save? If yes, you could try the following: When loading SNT, do not select “frontmost image” as the tracing image. Instead, use the option “load Image from path below” and specify the path to the saved tif. The reason why this should work is because the former uses the Legacy Service to load the image, the latter temporarily uses IJ1.

That was an overlook on my side. Will fix it. BTW, the reason why we do not use “default” dialogs in such prompts is multi-display support: SNT own dialogs should always appear on the active display, when using multiple screens.

I will wait a bit before pushing a new update, as I’m sure you will find other issues :slight_smile:


Just pushed an update that will greatly simplify things for your workflow:

  1. Make a stack from all of your 2D images using File>Import>Image Sequence…
  2. Run Image>Properties… and swap the Z and T dimensions of the imported stack
  3. Run Plugins>NeuroAnatomy>SNT… and choose the imported stack as the tracing image. You will be then greeted with a message along these lines: “Image seems to have xx time-points but only 1 Z-slice. Would you like to swap the dimensions?” Answering “No” will force SNT to trace in 2D.
  4. In SNT, go to the Options tab, and uncheck the “Skip confirmation dialogs” checkbox at the bottom. From this point on, you can simply advance to the next 2D image in the sequence using the Frame spinner on the Data Source section of the Options tab
  5. As a bonus, and because the original filenames were included in the stack as slice labels, you can tag traced paths using Tag>Image Metadata… from the Path Manager

Hope this helps,
Also, the locale issue with the “,” vs “.” should also be fixed