Problem in numbers of neighbors

Hello,

I am tryng to quantify cell density in brain slices. I think that using the number of neighbors in the “MeasureObjectNeighbors” is what I need for that. However the results I get for it, either on the resulting image, or on the data table doesn’t seem to be correct.
I may be doing an obvious mistake, or forget something, but I can figure it out. So, thanks for your help!

I did a very simple pipeline:

  • smooth of the picture
  • IdentifyPrimaryObjects
  • MeasureObjectNeighbors
    and saving the pictures and the data I need.

The cells are really well recognized and identifed:

However, when I look at the image showing the number of neighbors, I see that isolated cells have more neighbors than cells that are clumped together and that isolated cells are represented the same color as some clumped cells:


(I used the default colormap).

One the other hand the image of percent touching looks correct:


(I used the default colormap).

Have you any idea of what is happening, or what I am doing wrong?

Another question: is there a way to display the colormap and its scale on the saved image?

Thanks a lot in advance for your help, and also for your work on this really great Cellprofiler software.

Cheers!

Jérémie.

Hi Jérémie,

This likely depends on what your settings are in MeasureObjectNeighbors. What we call “neighbors” depends on the “Method to determine neighbors” – for example I could imagine that if you “expand until adjacent” then even cells which are sparsely separated in reality might actually be deemed to have many “neighbors”.

Would you export and post your pipeline here so we can look? An example Image set would be useful too.

Thanks,
David

Hi David and thanks for your reply,

Here is an example image and the pipeline I created.
densite.cpproj (602 KB)

For the method in order to determine the “neighbors” I am using the simplest one, which is “Adjacent”.

Bests,

Jérémie.

Hello David,

Could you get the image and the pipeline correctly? Would you have any idea regarding my question?

Thanks a lot,

Jérémie.

Hi Jérémie,

Indeed, the “Nuclei colored by # of neighbors” display appears to be incorrect. I suspect it is only the display of the the colormap, and that the exported data is correct. Do you see problems in the CSV output? In any case, I am filing a bug and will report back here when we have checked it out more fully.

Thanks,
David

[GITHUB ISSUE github.com/CellProfiler/CellPro … ssues/1205]

Hi again,

It turns out that this has already been fixed. You can try a new “trunk build” version from here (read the caveats!):
cellprofiler.org/cgi-bin/trunk_build.cgi

The fix will be automatically included in our next release. Let us know how it goes!
David

Thank you for your answer and your help. It is just working now.

Cheers,

Jérémie

Great - thanks for the feedback.

Cheers,
David