I find DT’s masking functionality usually sufficient but sometimes I could use more power. This thread gave me an idea for flexibly combining raster masks.
It’s the MMM, the Mask Manipulator Module, a new module, and being based on raster masks, it effectively supports parametric masks, which the Mask Manager doesn’t. You can put an instance anywhere in the pipe and it will combine raster masks which are “live” at that point, producing an output raster mask which is then “live” from that point on. You can probably imagine the way it could combine masks -
AND (“Exclusive” in module masking, “Intersection” in Mask Manager) for 2 or more masks
OR (“Inclusive” in module masking, “Union” in Mask manager) for 2 or more masks
EXCLUSIVE OR ("Exclusion in Mask Manager) for 2 or more masks
MINUS (“Difference” in Mask manager) for 2 masks
It would need to perform sensible operations on pixel opacities similar to those already in Mask manager, e.g. where a pixel is in more than one mask the user can choose min max or a mean. For MINUS there’s the option to exclude the pixels being subtracted completely, or subtract opacity.
You could allow a mask to be inverted before combining, as currently happens.
You could have the option to delete input masks after combining, this would presumably reduce memory needs.
Multiple instances would allow a complex mask to be built in stages.