Personally, I yearn for a command line image editor. ImageMagick is nice, but it can't do everything. Once you've gone cli, it's hard to go back to gui applications, since they're so inefficient.
I don't really know what "mask" and "extract" mean in this context. If you mean arbitrary selection of shapes then I have a couple of ideas how it can be accomplished. For mouse use I know the theory of arbitrary shape selection, but I never can get it quite right, since moving the mouse around the shape is very difficult for me.