Convex polyominoes and heaps of segments