Exclude Module


Hi, I am having problems using the exclude module. I am trying to remove satellite objects outside of the cytoplasm of cells so I am taking the identified satellite objects and excluding those outside of the cell area. However, when I use the MeasureObjectAreaShape module I get more Filtered objects than I do before. When i overlay the boundaries of before and after exclude module it seems that some of the satellite objects have been split in a different way to that specified in the original IdentifyPrimAutomatic module. Is there a reason why this could be? Thanks, Gareth.


Hi Gareth,

I could imagine this happening if you have an satellite object which is on the border of a cell area (i.e., partly in, partly out). Depending on the shape of the object, once it gets masked by the cell area, if it was one contiguous object, it could get turned into two disconnected objects if it’s the right shape. Does that seems like what could be happening?

If not, if you have a before/after pictures that you could attach to your reply, that would be helpful in diagnosing the issue.



Hi Mark,

This could well be the problem actually, i will send you some pictures shortly to check. Is there any way around this? Because i need to exclude satellite objects that are on the surface of a cell and not in it. The relate module as far as i’m aware includes objects on the boundary of the cell so it needs something else to exclude these.

Thanks for your help!


Hi Gareth,

One possibility is to take the objects that represent the cell area and then shrinking them by a few pixels (essentially making them smaller). Then you can try excluding the satellite objects again using the smaller cell object.

The amount of shrinking would be determined by the size of the objects residing on the cell surface that you want to get rid of. The idea is to shrink the cell enough so that new shrunken cell object and the surface satellite objects don’t overlap anymore; then you can exclude them without having them split into more pieces. Of course, if the satellite objects appear on the cell surface but also extend into the cell itself by a significant amount, this approach won’t work.

To do this, you would use the ConvertToImage module to change the cell objects into an binary image. Then use the Morph module with the ‘erode’ function to shrink it; the number of repetitions corresponds to the number of pixels you want to shrink the cells by. Then use IdentifyPrimAuto to convert the image back into an object, and then finally use Exclude on the resultant object.

Hopefully this makes sense!


Hi again,

Here’s another idea for your problem: You can convert the large cell objects into a binary image (using ApplyThreshold), then use MeasureObjectIntensity upon the satellite objects but against this new binary image.

What this will do is basically count the number of cell object pixels contained in each satellite object. Those satellite objects that don’t overlap with the cell object will have a count of zero. Those that overlap by any degree will have a count greater than 0.

At this point, you could then use FilterByObjectMeasurement to remove the satellite objects that have an integrated intensity of zero.

Hope this helps!


This works well, thank you!