function show_rects_in_primary(ref)
    data=get(groot,'UserData');
    for idx=1:length(data.rect)
        rect=data.rect(idx);
        rect.UserData.geo_list=[];   
        if rect_in_cv_hull(rect,ref)            
            data.rect(idx)=display_rect_in_ref(nexttile(1),rect,ref);
        end
    end
    set(groot,"UserData",data);
end