I think the handling of multiple labels depends on each action and needs to be handled separately.
- Boolean Operations: I see a few options here
- low effort: only allow for segmentations with one label. If there is more than one label, show a message that this is not possible
- higher effort: completely rework the selection. Let the user select two specific labels (from the same or different segmentations) and work on these, either replacing the first label or adding a new label (or instance) to that segmentation
- Contour to Image & Surface to Image:
- low effort: leave it as is, still works at the moment
- higher effort: introduce the option to add the newly created segmentation as a new label / instance to an existing segmentation
- Image Masking:
- low effort: leave it as is, still works at the moment (using all labels of a segmentation)
- higher effort: introduce the option to select which labels/instances should be considered for masking
- Morphological Operations: Currently don't crash, but always use label 1
- I think the most senseful solution would be to let the user select a specific label for the operation to work on. Multiple at the same time probably only get in each other's way and make it unnecessarily complicated.