Indices and number pixels for rectangle shapes

 New branch opened due to Travis is not working with old branch (q_roi).Changes made according to the comments.
The order should be (row, columns) to match the ordering of numpy indexing