Added rectangle and region of interest api.