Hi @DStirling, thanks for your response,

The measure object neighbours in this pipeline is being used to ask a different question, ie, how many cells is each cell touching.

What I am having trouble with is the question: how many cells are in a radius of x um. Which would give a good measurement of local density. The idea was that from this, I can then ask, is this because the cells are touching etc.

I think that the issue with the module I am having is that the ‘Within a Specified Distance’ option uses some sort of expanding the edges of objects to measure the number of neighbours. Which is good for some uses but not the specific question i am trying to ask.

From the wiki:“The Neighbor distance is the number of pixels that each object is expanded for the neighbor calculation. Expanded objects that touch are considered neighbors.”

So if i am correct it should look something like this:

Where what i am doing with the smooth and circle average filter on the left, and what Within a Specified Distance from Measure Object Neighbours is doing on the right.

So i use a radius of 6px in Within a Specified Distance (half the radius of circle average filter), and i get wildly different results. I have attached an excel file (and pipeline) to show this. While the local density column (green) shows increasing density up to 6 neighbours, which looks correct. The measure object neighbours (yellow) shows neighbours of only 0/1 and doesn’t correspond to the circle average filter numbers either.

MyExpt_Nuclei.zip (224.1 KB) Local Density V8.cppipe (44.9 KB)