I think what might be happening is that you want to measure the total area of the SFMasked objects, but that is not what you are measuring.
MeasureObjectSizeShape is measuring the morphology of each individual SFMasked object; the total area of all objects is not included. One way to do this is use MeasureImageAreaOccupied but that is a per-image area and wouldn't work if you have more than 1 masked area. So I would recommend the following instead:
- RelateObjects to establish a parent-child relationship between the SFMasked "children" and the enclosing InfectedCellObject "parent".
- ReassignObjectNumbers to unify the SFMasked children with "Per-parent" as the unification method and InfectedCellObject as the parent. This will produce a single object (call it UnifiedSFMasked) with all the original SFMasked objects. The nice thing here is that any measurements on the unified object are performed across all component objects. It also insures that any downstream calculations with the unified objects and the parents will be 1:1.
- MeasureObjectIntensity, with SFOutlines as the input image and UnifiedSFMasked as the input objects.
- MeasureObjectSizeShape with InfectedCellObject as the input object.
- CalculateMath for the intensity ratio, with UnifiedSFMasked > Intensity > IntegratedIntensity > SFOutlines as the numerator, and InfectedCellObject > SizeShape > Area as the denominator. The result shown is just the averge of the object measurements, not the final answer; you need ExportToSpreadsheet for that.
Keep in mind, that if the parent InfectedCellObject consists of multiple fragments/pieces, the UnifiedSFMasked objects will be broken up similarly. Therefore, if you have 3 InfectedCellObjects in the field-of-view, then you will have 3 UnifiedSFMasked objects, and hence 3 ratios, one for each. If you want a single value per-image, then you are better off using MeasureImageIntensity with SFMasked and SFOutlines, and MeasureImageAreaOccupied with SFMasked.