Another Fiji question where I’m not whether sure I am missing something obvious as I don’t normally use IJ for these things myself (but want to outline a way for facility users who like to use imageJ).
I am looking for a way to Dilate/Enlarge regions by up to n pixels, but without encroaching into neighbouring regions. The typical scenario is dilate from the nuclear marker to (an approximation of) the whole cell in order to measure intensity. Watershed is not a good idea as the channel in which intensity is to be measured should not be used for segmentation.
I can come up with a workflow that could be turned into a macro (below), but I wonder whether there is a simpler built-in method that I am overlooking.
Outline of workflow:
- Given ROIs (i.e. from nuclear segmenation)
- Create label image from ROIs using macro as outlined here.
- Create binary image from label image.
- Use morphological dilation to enlarge binary mask by desired number of pixels n .
- Use Seeded Watershed in MorphlibJ, using dilated binary image as mask and label image as seeds, with binary seeds deselected
- Threshold resulting foreground object to find objects with label > 1.
- Run analyze particles to turn objects into ROIs.
That works, but it seems incredibly complicated.