Layer & Sholl Lengths

Hello,

Is there a way to generate a table containing the dendritic length within each Sholl shell? I could only measure the entire neuron by adding the path lengths of each neurite.

Also, what is the best way of measure the dendrite length between layers (ie., SLM and SR layers)?

Thanks again!

Isabel,
Cases like this it is always best to upload some images as example…
Also go easy on the acronyms: SLM and SR may not mean much to extremely talented people outside the Neurosciences that have the expertise to help you out.
As a rule of thumb: Only well-thought questions can have well-thought answers! :slight_smile:
Anyway, I think I understood your two questions, so I will rewrite the first one here for clarity:

Question 1: I have a (traced) neuron, and would like to restrict the measurements of my traced paths to confined regions, defined by histologically-defined boundaries, such as in this neurolex example (in which the traced the neuron appears in filled lines, and histological layers (labeled in latin) are highlighted by dashed lines).
How can it be done?
(NB:I am using Simple Neurite Tracer (SNT) and an updated Fiji installation subscribed to the Java8 updated site.)

You would trace your neuron AND also trace the boundaries of the layers of interest (exactly as in that neurolex example). You could either store the traces for the layers on the same file containing the neuronal traces, or on a separate file. Then, you would need to write a script that would loop for all the traced points in the neuron and monitor their location relatively to the traced boundaries.

If you don’t want to script your way out of this problem, than you could try the “ImageJ” way:

  1. Trace your neuron, and in SNT obtain its skeletonized image using the Make Line Stack command
  2. Trace your layers and obtain their skeletonized image as in 1. Do some processing so that your layers become filled regions
  3. Use the logical operators in Process>Image Calculator to extract the voxels of image 1 that contained by the image 2 mask
  4. Then use Analyze>Skeleton to measure the result

Let us know if something is not clear. Now for your second question:

The answer is similar to the one above: You would need a script (BTW, I would be quite surprised if something does not already exist, e.g., for Neuron), or use a similar approach as the one described above. Just this time, skeletonized paths would need to be filtered by annular masks. Let us know if you need help with the latter.
I’ve added a new issue for this If people think this is an important feature. But I have to say I won’t have much time to work on it any time soon.

BTW, I wanted to mention that it will be soon possible to run the Sholl Analysis plugin on SNT traces directly, and vice-versa run the Sholl Analysis plugin from within SNT.

3 Likes

Thank you very much for your help! I sincerely apologize for not explaining!

I updated FIJI, but it mentions there are locally modified files? Also, this error dialog appears after I select Analyze>Sholl>Sholl Analysis (Tracings):

(Fiji Is Just) ImageJ 2.0.0-rc-54/1.51g; Java 1.8.0_66 [64-bit]; Windows 10 10.0; 42MB of 2956MB (1%)
 
java.lang.IllegalArgumentException: character to be escaped is missing
	at java.util.regex.Matcher.appendReplacement(Matcher.java:809)
	at java.util.regex.Matcher.replaceAll(Matcher.java:955)
	at java.lang.String.replaceAll(String.java:2223)
	at sholl.Call_SNT.normalizedPath(Call_SNT.java:379)
	at sholl.Call_SNT.dialogItemChanged(Call_SNT.java:268)
	at sholl.Call_SNT.showDialog(Call_SNT.java:211)
	at sholl.Call_SNT.run(Call_SNT.java:89)
	at ij.IJ.runUserPlugIn(IJ.java:217)
	at ij.IJ.runPlugIn(IJ.java:181)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:745)

I was wondering if I could use the straight or segmented line function to separate layers and determine the length of the layer. Can you please explain how to create the annular masks? Thanks!

Have a look at the ImageJ FAQs, it will tell you how to deal with locally modified files.

Thanks for the bug report. The plugin uses regular expressions to validate file paths, but I forgot to include the ones used by Windows. I sincerely apologize. It is now fixed. I will try to upload the new version to the java 8 update site later today but some work still needs to be done on Simple Neurite Tracer to make the Sholl Analysis (Tracings) command fully functional. Please hang in there.

Probably. Do you want to post a representative image?
BTW, I forgot to mention in my earlier post: Since you already traced your arbors, do have a look at L-Measure and REMOD. You can probably achieve your base-length analysis without additional effort with these tools.

1 Like

Thank you very much for all your work!

I would like to create distinct layers far from the soma and measure the lengths of the dendrites within that specific layer, just like below:

Is there a way to measure dendrite length using Simple Neurite Tracer? Or can a Sholl analysis be confined to a specific region? Thanks!

I will definitely look into the programs you recommended!

Here is a rather simple workflow that avoids scripting altogether:

  1. Subscribe to the Neuroanatomy update site. Restart IJ.
  2. Trace your cell in Simple Neurite Tracer (SNT). Once tracing is complete run Analysis>Make Line Stack from within SNT
  3. Digitized paths will be displayed in a new stack. Select and area ROI (probably using the polygon selection tool) delimiting the layer of interest.
  4. Ensure that the active background color in the Color Picker is set to black
  5. Run Edit>Clear Outside followed by Analyze>Skeleton>Summarize Skeleton: The Skeleton Stats table will give you the total length of the processes confined within the polygon specified in 3.

Have a look at this post from a related topic. Does it help?

1 Like

Thank you very much! The restricted region should be the max branch length, correct?

Thanks again!

I Just wanted to mention that this issue has been fixed with the new releases of Simple Neurite Tracer and Sholl Analysis. You can get the new plugins by running Help>Update… on a Fiji installation subscribed to the Java 8 update site.

1 Like

Thank you very much, Tiago!

@IR23, I just realized I haven’t provided you with the details on how to achieve this using the latest version of SNT:

  1. Run the Updater Help>Update… to ensure your plugins are up-to-date
  2. Run Help>Update ImageJ… and choose daily build. This will allow you to have access the new “Rotated Rectangle” tool (discussed here)
  3. Use whatever strategy you prefer to generate the rectangular ROIs defining your layers. Store them in the ROI Manager (Shortcut: t), and renamed them accordingly.
  4. Load your traces in SNT. Select a ROI in the Manager
  5. In SNT, run Render/Analyze Skeletonize Paths choosing “Render only segments contained by ROI” and “Obtain summary”.
  6. Total length of all the path segments whose XY coordinates were contained by the area ROI will be listed on a newly displayed Summary table

Here is (a rather crowded) screenshot of this workflow:

NBs and Caveats:

  1. The above is a simple, GUI-based, approach that filters 3D points based on X,Y coordinates. It works with any area ROI and is macro recordable. The drawback is that measurements are performed on digitized paths, not the original tracings. However, for total length, (the metric that you are trying to obtain), the loss of precision is negligible.

  2. It would be preferable to have a counter staining that would help you delineate the strata such as a nuclear mark, or even MAP2. Please consider incorporating it in your workflow.

  3. With Sholl you’d be assuming that layers have convex boundaries. The snapshot below illustrates this: E.g., If you are only interested in detecting processes below the lower boundary (lowest green line) defined orthogonally to the neuron axis (blue line), shells with wider radius can include sites above the boundary.

2 Likes

Hi Tiago,

Thank you very much! This is very helpful!!

1 Like