def center_image_on_row_window(input_img, window_size):
    """
    Bounds which center the input image on the window provided. If window is
    larger than the image, the original image bounds are returned.

    input_img     - Input image
    window_size   - Size of window to cut from center of image

    Returns a tuple with (index of first row from original image,
                          index of last row from original image
                          )
    """
    num_reads = input_img.shape[0]
    min_read = max(0, int((num_reads - window_size)/2))
    max_read = min(min_read + window_size, num_reads)
    return (min_read, max_read)