src/create_rois.py
def prune_regions(regions):
    '''
    Get rid of any regions with aspect ratios bigger than 4. Why 4? Good question.
    '''
    restart = True
    while restart:
        restart = False
        for region in regions:   
            if check_aspect_ratio(region, 4):
                regions.remove(region)
                restart = True
                break
            
    regions = cluster_regions(regions)
    
  
    return(regions)

    Get rid of any regions with aspect ratios bigger than 4. Why 4? Good question.
    
Get rid of any regions with aspect ratios bigger than 4. Why 4. Good question.
Get rid of any regions with aspect ratios bigger than 4 . Why 4 . Good question .
def prune_regions(regions):
    restart = True
    while restart:
        restart = False
        for region in regions:   
            if check_aspect_ratio(region, 4):
                regions.remove(region)
                restart = True
                break
    regions = cluster_regions(regions)
    return(regions)
def prune_regions ( regions ) : restart = True while restart : restart = False for region in regions : if check_aspect_ratio ( region , 4 ) : regions . remove ( region ) restart = True break regions = cluster_regions ( regions ) return ( regions )
Get rid of any regions with aspect ratios bigger than 4.
Get rid of any regions with aspect ratios bigger than 4 .
'''
    Get rid of any regions with aspect ratios bigger than 4. Why 4? Good question.
    '''
regions