def join_segmentations(s1, s2):
 if (s1.shape != s2.shape):
  raise ValueError(('Cannot join segmentations of different shape. ' + ('s1.shape: %s, s2.shape: %s' % (s1.shape, s2.shape))))
 s1 = relabel_sequential(s1)[0]
 s2 = relabel_sequential(s2)[0]
 j = (((s2.max() + 1) * s1) + s2)
 j = relabel_sequential(j)[0]
 return j

def join_segmentations ( s1 , s2 ) : if ( s1 . shape != s2 . shape ) : raise ValueError ( ( 'Cannot join segmentations of different shape. ' + ( 's1.shape: %s, s2.shape: %s' % ( s1 . shape , s2 . shape ) ) ) ) s1 = relabel_sequential ( s1 ) [ 0 ] s2 = relabel_sequential ( s2 ) [ 0 ] j = ( ( ( s2 . max ( ) + 1 ) * s1 ) + s2 ) j = relabel_sequential ( j ) [ 0 ] return j
return the join of the two input segmentations .