I have a vacuole and the plasma membrane as objects in my cellprofiler pipeline and need them to be related for analysis. But, since they aren’t touching this can’t be done simply. Any ideas?
update: Clarification: I need to measure the intensity within the vacuole and PM, so any changes to those objects would need to be undone before measurements are taken.
Anne’s recommendation should definitely work but just in case you want another option, I had a similar project to this and I worked it out by running IdentifyPrimaryObjects twice. One where I didn’t used the “Fill holes” parameter and one where I didn’t.
This meant I had ring shapes and then filled in ring shapes. The first I used to measure and the second I use to relate the object with stuff inside.
The enlarged objects should have the same object number as the original objects.
Thus, when you have the output tables at the end you can use the enlarged objects for the object relationships and the original objects for whatever other measurements you want to relate.
I’m not sure whether it is feasible for the segmentation, but a better approch would be to identigy the nuclei as primary objects, secondary objects for the whole cytoplasm and tertiary object for the vacuoles.
Okay, I have done my own test and confirmed I get the same behaviour. This does remind me of my post in your other thread because I did think that it wasn’t possible to calculate maths using related objects. I was thinking of a case where there were multiple children but the point about objects kind of holds.
The issue is despite the fact your two object sets are “related” now, actually what happens is a third object set is created which really just contains the relationships between the parents and children. Your two original object sets which have been measured are unchanged by the RelateObjects module so the result would be the same if you did the math before or after this module. So it just divides them by their object numbers.
I’m trying to think of a way to get around this. It seems like something that might have come up before on the forum but so far my searching hasn’t worked.
Do all your cells have both a vacuole and a plasma membrane? If so you could maybe try using “IdentifyPrimaryObjects” and “IdentifySecondaryObjects” instead as the math will work this way.