How can I limit the size of a Secondary Object?

I have a difficulty to discard large, over-sized secondary objects. They are determined by a GFP signal, and most of them look pretty good, however there are sites with contaminates (in terms of staining/fluorescence, not biological) that appear as big, round bright stains. In these cases the pipeline attributes the stain to the neighboring primary object (nucleus) and the result is a huge artificial cell. Please see the attached files for demonstration. I’m looking for a solution for this, and tried quite a few options such as threshold strategy/method/smoothing/correction and so on. I looked for a setting that will limit the maximal size of a secondary object but couldn’t find any so far. Any ideas how to omit these artifacts?

I think your best bet is to use a MeasureObjectSizeShape module to measure the cells, and then a FilterObjects module with the following settings:

  • Set the object to filter as the cell objects.
  • Measurement to filter by: AreaShape > Area
  • Set the minimum and maximal vlaues that you want. I often find a DisplayDataOnImage just beforehand to visualize the selected measurement overlaid on the objects to be helpful.
  • Click the “Add an additional object” button, and select the nuclei as the objects to relabel and give them a new name.

What this does is retain cells that fall within the size limits, and allows you to retain the nuclei associated with them.


I just saw this, and wanted to point out that one can also use the “Distance-B” method in IdentifySecondaryObjects. There is an additional setting for this method called “Number of pixels by which to expand the primary objects” which puts a maximum on how far to expand a secondary object. It also uses the background image (hence the “B”) to limit the expansion, so that if the image has a very low background near the primary object, it will stop expanding before it reaches this user-defined limit.