def _grow_labels(seeds, extents, hemis, names, dist, vert, subject):
 labels = []
 for (seed, extent, hemi, name) in zip(seeds, extents, hemis, names):
  (label_verts, label_dist) = _verts_within_dist(dist[hemi], seed, extent)
  if (len(seed) == 1):
   seed_repr = str(seed)
  else:
   seed_repr = ','.join(map(str, seed))
  comment = ('Circular label: seed=%s, extent=%0.1fmm' % (seed_repr, extent))
  label = Label(vertices=label_verts, pos=vert[hemi][label_verts], values=label_dist, hemi=hemi, comment=comment, name=str(name), subject=subject)
  labels.append(label)
 return labels

def _grow_labels ( seeds , extents , hemis , names , dist , vert , subject ) : labels = [ ] for ( seed , extent , hemi , name ) in zip ( seeds , extents , hemis , names ) : ( label_verts , label_dist ) = _verts_within_dist ( dist [ hemi ] , seed , extent ) if ( len ( seed ) == 1 ) : seed_repr = str ( seed ) else : seed_repr = ',' . join ( map ( str , seed ) ) comment = ( 'Circular label: seed=%s, extent=%0.1fmm' % ( seed_repr , extent ) ) label = Label ( vertices = label_verts , pos = vert [ hemi ] [ label_verts ] , values = label_dist , hemi = hemi , comment = comment , name = str ( name ) , subject = subject ) labels . append ( label ) return labels
helper for parallelization of grow_labels .