jstout211 / enigma_MEG

Other
9 stars 1 forks source link

Print Null image if overflow past the image_list length #13

Closed jstout211 closed 1 year ago

jstout211 commented 1 year ago
def create_window_layout(image_list=None, sub_obj_list=None, qa_type=None, grid_size=GRID_SIZE,
                    frame_start_idx=0, resize_xy=(600,600)):
    layout = [[sg.Text(f'QA: {qa_type}')]]
    frame_end_idx=frame_start_idx+grid_size[0]*grid_size[1]
    current_idx = copy.deepcopy(frame_start_idx)
    for i in range(grid_size[0]):
        row = []
        for j in range(grid_size[1]):
            if current_idx > len(image_list):
                print('None Available')    **#!!! FIX - show a null image**
jstout211 commented 1 year ago

Fixed here: 3ec6efb2be42a30a85c58d79cc2feeb734901cd6