def epc_calc_roi(reg_dict):
    """
    Get the current region on interest (ROI) of the image sensor 

    Parameters
    ----------
    reg_dict : dict
        The dictionary that contains all the register information

    Returns
    ----------
    col_start : int 
        The column start of readout 
    col_end : int 
        The column end
    row_start : int 
        The row start 
    row_end : int 
        The row end 
    """
    col_start = reg_dict["roi_top_leftx_hi"][2] * \
        256 + reg_dict["roi_top_leftx_low"][2]
    col_end = reg_dict["roi_bot_rightx_hi"][2] * \
        256 + reg_dict["roi_bot_rightx_low"][2]
    row_start = reg_dict["roi_top_lefty"][2]
    row_end = reg_dict["roi_bot_righty"][2]
    return col_start, col_end, row_start, row_end