def create_starts_end(array, start_point=0, open_dx=True):
    """
    Create arrays containing all the starting and ending indexes for the tiles on the desidered direction
    Input:
       array = Array containing the size for each tile on the desidered direction
       start_point = Starting index for the input immage (optional)
       open_dx = If true (the default value) ==> ending indexes = subsequent starting indexes ==> Open end
    Output:
       star_arr = Array containing all the starting indexes for the tiles on the desidered direction
       end_arr = Array containing all the ending indexes for the tiles on the desidered direction
    """
    len_arr = len(array)
    ind_arr = list(range(0, len_arr))
    start_arr = []
    end_arr = []
    if open_dx:
        dx_pad = 0
    else:
        dx_pad = -1
    for i in ind_arr:
        if i != 0:
            start_point = start_point + array[(i - 1)]
        start_arr.append(start_point)
        end_point = start_point + array[i] + dx_pad
        end_arr.append(end_point)

    return (start_arr, end_arr)