Changeset 78 for trunk/src/mouse_up.m


Ignore:
Timestamp:
Apr 2, 2010, 9:01:21 PM (14 years ago)
Author:
sommeria
Message:

debugging of geometry_calib and mouse operations
merge_proj: call to read_image replaced. Still problems to solve to merge images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_up.m

    r71 r78  
    262262
    263263% editing calibration point
    264 if strcmp(MouseAction,'calib')
    265     hh=findobj(currentaxes,'Tag','calib_points')%look for handle of calibration points           
    266     if ~isempty(hh)
     264if ~zoomstate strcmp(MouseAction,'calib')
     265    h_geometry_calib=findobj(allchild(0),'Name','geometry_calib'); %find the geomterty_calib GUI
     266    hh_geometry_calib=guidata(h_geometry_calib);
     267    edit_test=get(hh_geometry_calib.edit_append,'Value');
     268    hh=findobj(currentaxes,'Tag','calib_points');%look for handle of calibration points           
     269    if ~isempty(hh) && edit_test
     270        index_point=get(hh,'UserData');
    267271        set(hh,'UserData',[])%remove edit mode
    268         h_geometry_calib=findobj(allchild(0),'Name','geometry_calib'); %find the geomterty_calib GUI
    269         hh_geometry_calib=guidata(h_geometry_calib);
    270272        h_ListCoord=hh_geometry_calib.ListCoord; %handles of the coordinate list
    271273        Coord=get(h_ListCoord,'String');
    272         val=get(h_ListCoord,'Value');
    273         coord_str=Coord{val}; %current line (string)
     274%         val=get(h_ListCoord,'Value');
     275        coord_str=Coord{index_point}; %current line (string)
    274276        k=findstr('|',coord_str);%find separator indices on the string
    275277        xy=get(currentaxes,'CurrentPoint');%xy(1,1),xy(1,2): current x,y positions in axes coordinates
     
    279281            coord_str=[ '    |    '  '    |    '  '    |    ' num2str(xy(1,1),4) '    |    ' num2str(xy(1,2),4)];
    280282        end
    281         Coord{val}=coord_str;       
     283        Coord{index_point}=coord_str;       
    282284        set(h_ListCoord,'String',Coord)
     285        data=read_geometry_calib(Coord);%transform char cell to numbers
     286        set(hh,'XData',data.Coord(:,4))
     287        set(hh,'YData',data.Coord(:,5))
    283288    end
    284289end
Note: See TracChangeset for help on using the changeset viewer.