Tracing individual neurites

Hi forum, first time posting. I do apologize as I know this topic has been done to death, but I’m still struggling to generate a good pipeline.

Sample image and/or code

Example project/pipeline:
JC_Pipeline_Working.cpproj (1.0 MB)


I am plating neurons which all have a green nuclei, and ~1:100 also have red cytoplasm, so that individual neurons can be identified and several features can be extracted. Each well will have 12 stitched images (above I uploaded a single field of view as an example).

Analysis goals

I’ve currently put together a pipeline to get the coarse measurement of “area covered by neurites” (attached above), however ideally I would also like to get information about: neurite length, number of branching points in the neurite, and how many trunks extend from each cell body. I think this is the bread and butter of the Measure___Skeleton modules, but so far I have not had much luck with them.


I’ve tried to use “Measure Secondary Objects” by propagation from the ‘soma’ object I identify in the picture, but I find that it often misattributes neurites from one cell to another cell. Similarly, when I try the MeasureObjectSkeleton module on a skeletonized version of the neurite objects, it often calls any crossing point a branch point. My question is: is getting reliable counts of these metrics even doable from images like the one I posted? i.e. should I just keep playing with the parameters, or should I try things on the biology side to make this analysis more robust. Thanks for any advice, I appreciate it!

Hi @Jc6213,

Nice work with your pipeline. Regarding the challenges you raise, I think it’s going to be common for neurites to be mis-attributed to cell bodies due to the way that they grow – in a web, where they do cross over each other. Likewise, I don’t know of any way to suppress crossing points being counted as branch points by MeasureObjectSkeleton, since they do appear to be branch points if you look only at the skeleton without prior knowledge of the image itself.

That said, image analysis tasks will always have some technical artifacts. You may be able to still answer your underlying biological question, though, even with these limitations. I refer you to this excellent blog post by @bcimini on “When To Say ‘Good Enough’” for a more thorough discussion of this topic.

If you are going to use IdentifySecondaryObjects to identify your neurites, I did have a few recommendations for you:

  • when testing the sample image you shared, when using EnhanceOrSuppressFeatures to enhance the neurites with the tubeness method, I found that a “Smoothing scale” of 3 reduced gaps from occurring along neurites and prevented parallel neurites from being under-segmented

  • using ImageMath to take the square root of the EnhanceOrSuppressFeatures output improved the signal-to-background ratio for the dim neurites:

  • The Closing module can be useful to eliminate gaps that occur along a neurite’s length that stop it from being accurately traced with IdentifySecondaryObjects:

  • I then used IdentifySecondaryObjects to grow the neurites from the red cell bodies. While it make not be perfect, depending on what condition you’re comparing to, it may be good enough!

I hope these ideas are helpful. Good luck!

Thank you for the advice Pearl, those ideas are very helpful! I appreciate you taking the time, those modifications definitely improve the pipeline. Thanks again.