See my attached pipeline. I added some notes in the Module notes section, but I will copy them here too.
[quote]Just to make sure I’m on the same page… Once I define the primary objects (nuclei), definition of the secondary object around it will not overlap with another neighboring nuclei?
Yes, primary objects cannot overlap with other primary objects and the same goes for secondary. HOWEVER, if what you see as a nucleus in the image is not segmented as a primary object, or it is excluded because it is too big or doesn’t meet some other criteria, then there is nothing to stop the IDSecondary from overlapping a nucleus. I am saying that because your pipeline’s IDPrimary shows this behavior as configured – many “nuclei” are outlined in red, meaning that they fall outside the 15-40 pixel diameter range you et, and so they are not considered as primary objects. I changed your IDPrimary settings to attempt to alleviate those restrictions. See how they work for you.
OK, some notes on the modules in order:
- ColorToGray: I changed these to SPLIT. COMBINE was needlessly reducing the intensity by a factor of 3, since these images are only purely red or blue.
- IDPrimary: Adaptive is probably better for tissue, with so much intensity variation. You could also try three-class thresholding. I expanded the size range to 8-50 pixels, since many objects fell outside this range. Including all the primary objects here is critical for the next step (IDSecondary) that you were concerned with. The other way to approach this is to not discard objects outside the size range. I also raised the threshold correction factor a little, but you should adjust this as you inspect both pos and neg control images.
- IDSecondary: The new primary objects were named “FilteredCells”. But this seems wrong to me – these should be FilteredNuclei, since they are primary objects.
- IDTertiary: Changed the old “FilteredCells” (which were actually Filtered Nuclei) to “Cells”. The smaller objects are now FilteredNuclei.
Previously the Cytoplasm was restricted to a single pixel width (and maybe not even that?).
- Measure(Object|Image)Intensity: Changed to only measure from FilteredNuclei, excluding the nuclei associated with excluded Cells that touch the border of the images.
- CalculateMath: Note that the Ratio as you have defined it is Nuclear intensity divided by cytoplasm (which I renamed RatioNucDivByCyto to be clear for others who might use this).
Hopefully this helps!
P.S. There are a couple objects that show NaN’s for some of their measurements, which seems odd to me. This was brought to my attention because the displayed Ratio was “nan”, but that is only because of the average of all the many objects includes a small number of “Not A Number”. It looks like they are some objects that are discarded because they touch the border, so it only affects a very few objects. Nevertheless, I’ll see if I can track this issue down, and we may already have a fix, not sure.
DLpipeline.cppipe (15.6 KB)