I’m trying to segment the plasma membrane vs. cytoplasm of fairly round cells. The cells typically have fluorescence enriched on the membrane, and also concentrated in the ER (which I’d like to exclude from the plasma membrane segment). Most of them are well-behaved and I can fairly easily get the membrane by identifying the nucleus as primary, identifying the cell as secondary using watershed, and then shrinking the cell by a fixed # of pixels to get a reasonable approximation of the inner membrane boundary. However, some of my cells have a more complex morphology - for example, in this image I’d like the membrane to be segmented as shown, but I can’t think of how to do it in CellProfiler. Algorithmically, I’d like to do something like start with the whole cells and then shrink each pixel inward by one unit until it detects an edge, kind of like a watershed but contracting instead of expanding. Is there a way to do this?