We are trying to count cells and their number of neighbors in an epithelial monolayer. When we do so manually, we don’t count the cells touching the edge of the image (source_image.png) or partially cut off by the edge, but we do allow them to be counted as neighbors to cells that aren’t on the edge of the image. As far as I can see, CellProfiler can only include these cells on the edge completely, adding them to the total count of cells and using them as neighbors to other cells, or completely discard them. The problem with including them all the way is that the measurements for area, shape, and number of neighbors for these cells would be off. But, if we completely discard them, as we have been doing, we’ll get a lot of cells with fewer neighbors than actual. This can be seen in idobjects_with_color.png, where many of the cells on the border are recognized as having 2, 3, or 4 neighbors, when they in fact have 5, 6, or 7 neighbors.
Is there a way to make CellProfiler exclude the cells on the edge of image in the total count, but let them count as neighbors of other cells?