DOC: Find the indices and number of pixels for rectangle shapes

open this branch due to conflicts in the previous branch( merge conflicts markers)