pysilcam/process.py
def extract_roi(im, bbox):
    ''' given an image (im) and bounding box (bbox), this will return the roi

    Args:
        im                  : any image, such as background-corrected image (imc)
        bbox                : bounding box from regionprops [r1, c1, r2, c2]

    Returns:
        roi                 : image cropped to region of interest
    '''
    roi = im[bbox[0]:bbox[2], bbox[1]:bbox[3]] # yep, that't it.

    return roi
 given an image (im) and bounding box (bbox), this will return the roi

    Args:
        im                  : any image, such as background-corrected image (imc)
        bbox                : bounding box from regionprops [r1, c1, r2, c2]

    Returns:
        roi                 : image cropped to region of interest
    
given an image (im) and bounding box (bbox), this will return the roi
given an image ( im ) and bounding box ( bbox ) this will return the roi
def extract_roi(im, bbox):
    roi = im[bbox[0]:bbox[2], bbox[1]:bbox[3]] 
    return roi
def extract_roi ( im , bbox ) : roi = im [ bbox [ 0 ] : bbox [ 2 ] , bbox [ 1 ] : bbox [ 3 ] ] return roi
given an image (im) and bounding box (bbox), this will return the roi
given an image ( im ) and bounding box ( bbox ) this will return the roi
''' given an image (im) and bounding box (bbox), this will return the roi

    Args:
        im                  : any image, such as background-corrected image (imc)
        bbox                : bounding box from regionprops [r1, c1, r2, c2]

    Returns:
        roi                 : image cropped to region of interest
    ''' # yep, that't it.
roi                 : image cropped to region of interest
roi : image cropped to region of interest
im
bbox
im                  
any image, such as background-corrected image (imc)
any image such as background - corrected image ( imc )
bbox                
bounding box from regionprops [r1, c1, r2, c2]
bounding box from regionprops [ r1 c1 r2 c2 ]