File size: 635 Bytes
907001b
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
def __hi2lo_multiscale_indexes(self, mask, orig_shape):
    """pass"""
    mask_orig = zoom_to_shape(mask, orig_shape, dtype=np.int8)
    inds_small = np.arange(mask.size).reshape(mask.shape)
    inds_small_in_orig = zoom_to_shape(inds_small, orig_shape, dtype=np.int8)
    inds_orig = np.arange(np.prod(orig_shape)).reshape(orig_shape)
    inds_orig += np.max(inds_small_in_orig) + 1
    inds_small_in_orig[mask_orig == True] = inds_orig[mask_orig == True]
    inds = inds_small_in_orig
    inds = relabel_squeeze(inds)
    logger.debug('Index after relabeling: %s', scipy.stats.describe(inds, axis=None))
    return (inds, mask_orig)