Region getMask function implemented
Region getMask function implemented