function show_secondary_sss_part(data,other_image,fig_id,kdx)
      axes(fig_id);
      second=imread(fullfile(other_image.path,other_image.id+".png"));
      pim=imshow(second);
      set(pim,'ButtonDownFcn',{@(src,evt) extend_secondary(src,evt,other_image,kdx)});
      rota=str2num(other_image.rota);
      perc=str2num(other_image.perc);
      for idx=1:length(rota)        
        axes(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(fig_id,other_image); 
%      save dump
end

function extend_secondary(src,event,ref,kdx) 
    if event.Button == 3
            extend_secondary_fkt(ref,kdx);
    end
end

function show_secondary_path(fig_id2,other_image)

      figure(fig_id2);
      lat=str2num(other_image.lat);
      lon=str2num(other_image.lon);
      yaw=str2num(other_image.yaw);      
      altitude=str2num(other_image.altitude);
      rota=str2num(other_image.rota);
      range=other_image.range;
      hull=str2num(other_image.hull);
      LaA=str2num(other_image.LaA);
      LoA=str2num(other_image.LoA);
      LaB=str2num(other_image.LaB);
      LoB=str2num(other_image.LoB);
      La=[LaA,LaB(end:-1:1)];
      Lo=[LoA,LoB(end:-1:1)];
      points=[La',Lo'];
      points=[points;points(1,:)];
      for idx=1:length(data.s_data)
        if data.s_data(idx).idx1<= other_image.cnt_id && ...
                other_image.cnt_id< data.s_data(idx).idx2
           lat=data.s_data(idx).lat;
           lon=data.s_data(idx).lon;
           break;
        end
     end
     geoplot(lat,lon);
     hold on;
     for kk=1:length(LaA)
       if ismember(kk,rota)
         geoplot([LaA(kk),LaB(kk)],[LoA(kk),LoB(kk)],'r-');
       else
         geoplot([LaA(kk),LaB(kk)],[LoA(kk),LoB(kk)],'b-');
       end
     end
     hold on;
     title(convert_to_title(other_image.id), 'Interpreter', 'none');
     hold off;
end