Creating a pipeline to measure neurons



Hi there,
I’m new with CellProfiler. I need some help with the module “Measure Neurons”. I have GFP expressing neurons with no nuclear staining. I want to quantify the total neurite growth over a period of time using time lapse imaging. I created a pipeline to study some pictures of neurons and get the neurite length from the images.
My pipeline is as follows:
EnhanceOrSuppressFeatures - (used to enhance the neurites)
ApplyThreshold - (used to enhance the cell body, such that low GFP expressing cells and the neurites are not detected)
IdentifyPrimaryObjects - (identifies the cell body)
ApplyThreshold - (to create a binary image)
Morph - (used the skel module to generate skeletonized image)
Export to Spreadsheet

Using this pipeline I’m able to generate skeletonized image of the neurons, My problem is that there is still some background in the images generated and not all detected neurites are attached to the cell soma and therefore not detected. How can I overcome this problem and also is it the right way to construct this pipeline. It would be great if you could please help me.

Thank you so much

Best wishes,



Your current pipeline is quite reasonable, but the issues of “not all detected neurites are attached to the cell soma” is kinda hard to solve since these objects are far away from each other.

You may have a look at this topic, hopefully you’ll have some more hints.

It’s probably better if you can provide some example images and your pipeline so we can try to tune it.



Hi Minh,
Thank you for the suggestion, I had a look on this topic and i guess the problem is that all neurites are not attached to the cell soma (because of stringent threshold) and are therefore not detected but I’m not sure. Also if I lower the threshold then both cell soma and neurites are detected as primary objects. It would be really helpful if you can have look at the pipeline and the images and give some suggestions to overcome this problem.
Please find herewith attached my pipeline and sample image measuring neuroms.cpproj (1.1 MB)

Thank you for the help,

Best wishes,


In your current pipeline, I saw that you used module ApplyThreshold combined with Automatic thresholding in IdentifyPrimaryObjects. This is not a recommended practice. Instead, you could use IdentifyPrimaryObjects with thresholding method Adaptive Otsu, especially when you have bright / dim shades of neurites like this.

Also, as mentioned in this topic , it’s better to first recognize the bodies of the neurons as the primary objects, then use them to find neurites as secondary objects.

Your first attached image was not the original image, it’s a .png saved by CellProfiler. I’ve tried to work on it nevertheless to build this pipeline, can you try to fine tune it with your original .tif image measure_neuron.cpproj (641.2 KB), pay attention to the size of your objects and the size of filters in EnhanceOrSuppressFeatures


Hi Minh,

Thank you so much for your help.



Hi Minh,

I’m sorry to bother you again, I have been working on the pipeline that you corrected some days ago, However I have the problem that although all neurites and cells are identified but when I skeletonize this image after applying threshold I doesn’t produce a well connected skeleton and alsothe neuron graph also does not appear to be correct.

The other approach I tried was to use the Distance N as the threshold method for identifying the cell and using this method I do get a better image of the skeleton and the neuron graph but I’m not sure if the skeleton should look like this. I’m attaching the pipeline and the skeletonized image. Please please can you have a look and help me. I have been stuck on it for so long.
improved_measure_neuron1.cpproj (492.6 KB)



With this image, we don’t think of anything that can improve it better. I guess you can try to link the disconnected skeletonized neurites with another layer of EnhanceOrSupressFeatures or Morph filters. But other than that, it seems you already explored all tuning approaches.


Dear Minh,

Thank you so much for your help. Yes I have already tried these filters. I was wondering that maybe I’m not doing it correctly.

Thanks again.