Filtering one kind of objects with respect to another kind




I found several strategies to filter one set of objects respect to other set.
What I want is to keep objects from set A only if they have at least one object of set B inside. Could you tell me what is the better way of doing it?




Good question. I would probably use the Relate module to relate B (children) to A (parents). Then, in the output, you will have a feature which is how many of B are in each of A. You can then filter out A’s that don’t contain any B’s. There is currently no way within CellProfiler to filter existing objects based on this criteria and do analysis on only those objects, so the downfall is that you will be making measurements on objects you don’t care about. We have been developing some Mask modules and soon this task should be easier to accomplish.

Another option is to use FilterByObjectMeasurement and filter by something like max intensity within object A using the image for object B. If there are any objects (B’s) present, you will have a much higher max intensity then an object A without any B’s.

Good luck!