def roi_reorder(sectors, new_order):
    """
    Given a roi with dimensions RxWxH where R are rois,
    reorder the roi order.

    Parameters
    ----------
    sectors : 3D array
        numpy array with dimensions RxHxW where R=roi,
        H=height, W=width
    new_order : list
        list of indices in correct order

    Returns
    -------
    reordered: 3D array
        numpy array with dimensions RxHxW
        with reorders rois
    """

    reordered = sectors[new_order,:,:]
    return reordered