Single Neurite Tracer for time lapse analysis (4D, xyzt)

Dear all,

does anyone know if it is possible to use the simple neurite tracer in ImageJ on time lapse images?
I know I cannot open 4D images, but is there still a way to somehow connect paths between images from different timepoints or somthing like that? Or other solutions to deal with time lapse tracings using SNT?

Thanks in advance!
Bahar

@Bahar

According to the SNT page on the ImageJ wiki

Tracing
** Support for up to 5D multidimensional images (including multichannel, and those with a time axis). While tracing, visibility of non-traced channels can be toggled at will*

So yes - it should apply to up to 5D images… How do you open your datasets? We recommend using Bio-Formats to open your images in ImageJ - that way your metadata is properly read in. If you are using Fiji - you can simply go to File > Import > Bio-Formats.

For more specific questions for SNT… @tferr is the best person to help. :slight_smile:

Thank you, etadobson! :slight_smile:
But SNT doesn’t start and complains that it only works with single 2D/3D images and not timeseries.
I also used bio-formats.

I will contact tferr, thanks! :slight_smile:

@Bahar,

That should not happen, unless you are running a really old version of the legacy Simple Neurite Tracer plugin. My guess is that your Fiji installation has updates disabled? You will need to update your Fiji and subscribe to the Neuroanatomy update site. Please follow the instructions at https://imagej.net/SNT#Installation. (Note that of this writing, imagej.net is down) so you will need to wait for the server to be back online. Let us know how it goes!

1 Like

@tferr,
Thank you for your reply! You are right, I was using an old version and did not realize that it did not get updated with updating ImageJ.
Now it works, but I still have a question:
As the ImageJ SNT sites are on maintenance, I was not able to look it up, but are there any SNT functions regarding the analysis over time?
Right now I am tracing for every time point manually. But if I want to assess how one particular dendrite behaves over time, I have to label it manually in every time point. Is there a function in SNT to kind of automatically connect similar dendrites over time and recognize them as the same?

1 Like

It is not clear if you are referring to analysis of time-lapse data or to tracing the time-lapse sequence. Can you please provide more details (a .traces file would help, you can upload it here by replacing the extension to e.g., txt)?

On the analysis: So far we have relegated that functionality to the scripting API. Can you provide more details on the end goal? Monitor the growth of individual dendrites across time? or changes in the arbor of a cell across time?

On the tracing itself: What would be useful? A sort of duplication tool that duplicates the existing traces associated with frame to the next one? In that case, how would you deal with a neurite retraction?

@tferr
I’m referring kind of to both tracing and analysis of time-lapse sequences.
Regarding the tracing I am doing everything semi-automatically. Since I have many time points and neurons, it would be very useful if I could do it automatically, but I think SNT cannot do that right?

When I have traced all dendrites in all time points, I am able to assign dendrites to their respective time points automatically (e.g. dendrites 1, 2, 3 in timepoint1, dendrites 3, 4, 5 in time point 2), but if e.g. dendrite 1 in time point 1 is the same as dendrite 3 in time point 2, which I only know by looking at my images, I have to assign them manually as the same dendrite.

And I would like to know if it is possible to assign individual dendrites automatically either during the tracing or later in the analysis.

I have a also uploaded a test tracing file: 4-n-test-trace.txt (3.2 MB)
It is not finished for all time points though, as it takes very long to do it manually :laughing:

The end goal is to monitor growth of individual dendrites across time.

A duplication tool could be useful, but I would still have to adjust it by elongating or shortening paths in case of growing or retracting dendrites. Also I would have to adjust for general movements of dendrites that are not due to growth or retraction, which I would be more difficult.

1 Like

@Bahar,
Until now, we have just assumed that API scripting would be the best way to trace and analyze dynamics of neuronal growth. But after feedback from you and others we have recognized that it would be indeed convenient to have GUI commands to facilitate 4D tracing. Yesterday @arshadic, and I released v3.1.105 that implements several commands that should be very useful here. Since the documentation is currently read-only, here is a forum-tutorial of the new commands (I’ll be using the 4-n-test-trace.traces file you provided above):

GUI Support for Timelapse and 4D Imagery in SNT

Tracing

When tracing the same neurite across time, it is be convenient to duplicate a path from one frame to another. But to be effective, the duplication should take into account retraction and elongation events between frames. SNT’s Edit>Duplicate… command handles this by ‘cloning’ sections of paths between frames. Such sections can be defined by length, or branch point-boundaries, etc. Here is how the Duplicate Prompt looks like:

Usage example:
If a neurite extends between frame t and t+n, one can duplicate the full length of the traced path to frame t+n. If it retracts, one would choose a suitable sub-section. In both cases, the Continue Extending Path option (right-click menu) can then be used to complete the tracing.

Analysis

It is worth noticing that all of the analysis commands are aware of time when tracing time sequences. E.g., To monitor the tracing progress across the video, one can run Analyze>Frequency Analysis>Distribution of Path Properties… (using Path frame as measurement) which outputs:

More advanced commands can be found under Analyze>Time-Lapse Utilities> namely:

Color Code Paths Across Time

Colors paths by mapping their position in the time-sequence to a lookup-table. E.g.,


(warmer hues corresponding to more recent time-points)

Match Paths Across Time

Looks at all the paths in a time-range, and groups (by means of “group tags”) those that are associated with the same origin. To accommodate for motion artifacts (focus drift, etc.), a tolerance range can be specified.

Time Profile

Retrieves morphometric traits as a function of time. This allows to e.g., monitor the amount of branching across time, or the total amount of cable length as in this example:

If paths have been “Matched Across Time”, it is also possible to directly look into the dynamics of individual neurites:

3 Likes

@tferr
Thank you so much!!! :slight_smile:
This really helps a lot!

One question, though:
When I duplicate a secondary path and its primary path where it originates from, the duplicated secondary path appears as a secondary path of the not-duplicated primary path.
Is there a way to change that?

@Bahar,

I am a bit confused with your question. I’m guessing you are asking if it is possible to duplicate a path and all of its children? Is that correct? If not, can you provide a directly example?

@tferr
Yes, that is what I mean!
Sorry for the confusion

@tferr
When I want to extend an existing path that I created with a duplication, I very often get the following error message:

ri Jul 24 17:42:53 CEST 2020] [ERROR] Module threw exception
java.lang.ArrayIndexOutOfBoundsException: 21
at sc.fiji.snt.plugin.PathMatcherCmd.run(PathMatcherCmd.java:162)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

And cannot extend the path. Only when I restart SNT, it is possible again until I again duplicate a path…

@tferr:
And one more thing: It is not possible to duplicate several dendrites right? But it would be very helpful if that was possible

@Bahar, The exception above is fixed (thanks for reporting it!), will push the update soon. I also added the option do duplicate a path and all of its immediate children. As per duplication of several paths in one go: It would be trivial to allow so in principle. However, one would need to be very careful to ensure connectivity between existing and duplicated paths would not interact in unexpected ways. That is the main issue holding it back.