function extend_secondary_fkt(other_image,fig_id)
    figure(fig_id);
    second=imread(fullfile(other_image.path,other_image.id+".png"));
    if ~ishandle(fig_id)
        figure(fig_id);
        imshow(second);
    else
        imshow(second,'Parent',gca(fig_id));
    end
    rota=str2num(other_image.rota);
    perc=str2num(other_image.perc);
    for idx=1:length(rota)        
        figure(fig_id);
        rectangle('Position',[1   ,perc(rota(idx))*1024,...
                              1023,0.0099*1024],...
                              'FaceColor',[0 1 0 0.25],'EdgeColor',[ 0 1 0 0.125]);
    end
    title(convert_to_title(other_image.id), 'Interpreter', 'none');
    show_rects_in_secondary_e(fig_id,other_image); 
end

function show_rects_in_secondary_e(fig_id,ref)
    data=get(groot,'UserData');
    for idx=1:length(data.rect)
        rect=data.rect(idx);
        if rect_in_cv_hull(rect,ref)
            display_rect_in_ref_e(fig_id,rect,ref);
        end
    end
end