Beyond-the-border intensity measurements



Hello! I’m trying to assay for a marker expressed in cell-cell junctions (let’s call it CB) from cells grown to various degrees of confluency, using fluorescent immunostaining. I’m subtracting the CB image from an actin stain and then calling IdentifySecondary against it, which yields surprisingly good segmentation but draws the cell boundary just inside the bright region of the CB stain, meaning that I can’t measure the CB-bright region as part of the cell.

I was tempted to dilate the identified cells a handful of pixels with ExpandOrShrink and then stamp out the cell body with IdentifyTertiaryRegion to isolate a CB-rich (or not) “border” region, but noticed to my dismay that when expanded cell boundaries overlapped, they merged into a single object.

My new strategy is to develop a module that will look at each identified cell, “expand” the border n pixels, and measure the intensity of that region without actually performing the cell-merging expand operation. My intuition suggests that this shouldn’t be hard but I’m not sure where to begin – I’m looking through modules now and we’ll see. I wanted to see if anyone had any tactical suggestions or had already done this, or if CP already supports what I’m trying to do somehow.



I think I’ve got it – that was surprisingly pleasant. More or less the same setup etc. as MeasureObjectIntensity, with a few calls to bwmorph in the middle. Will test & report back.



Another thought - ExpandOrShrink and IdentifyTertiary should both ‘respect’ individual objects’ identities - the objects shouldn’t merge (and if they really do, we should fix it!) I wonder if it’s because you are calling IdentifySecondary on a binary image rather than the objects that result from an IdentifyPrimary module? Or are the settings correct in ExpandOrShrink (that you are expanding secondary objects)? If everything seems proper and you are still getting merging, post your pipeline so we can fix the problematic module!



I may be misunderstanding the output I’m seeing, but it doesn’t look like overlapping objects work. See and compare handles.Measurements.Cells.* vs handles.Measurements.ExpCells.* – the object counts are the same but most of the expanded cells have merged together and have lost their individual identities. The merged cells have CenterX,CenterY replaced by NaN and their intensity measurements are zeroed out.

I think this makes sense if I understand the labeled-binary representation CP uses for objects – is it possible for a single pixel to have more than one label?