Setting extents with masks