code: def segments(self):
          
          segments = dict()
          for i in xrange(len(self)):
              image = self[i]
              for z, contour in image.as_segments.iteritems():
                  for byte_value, contour_set in contour.iteritems():
                      if byte_value not in segments:
                          segments[byte_value] = dict()
                      if z not in segments[byte_value]:
                          segments[byte_value][z] = contour_set
                      else:
                          segments[byte_value][z] += contour_set                
           
          return segments
docs: A dictionary of lists of contours keyed by z-index