Signals extraction to/from regions as maps

Removed old functions (un)apply_mask_to_regions()
Tests for new functions have been added as well.