Gravar-mail: Deformable image registration for adaptive radiotherapy with guaranteed local rigidity constraints